Impl Deref<PathBuf> for StoreId
This commit is contained in:
parent
4d4acf9168
commit
b4db587a10
1 changed files with 10 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::borrow::Borrow;
|
use std::borrow::Borrow;
|
||||||
|
use std::ops::Deref;
|
||||||
|
|
||||||
use glob::Paths;
|
use glob::Paths;
|
||||||
use semver::Version;
|
use semver::Version;
|
||||||
|
@ -24,6 +25,15 @@ impl Into<PathBuf> for StoreId {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Deref for StoreId {
|
||||||
|
type Target = PathBuf;
|
||||||
|
|
||||||
|
fn deref(&self) -> &PathBuf {
|
||||||
|
&self.0
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
impl From<PathBuf> for StoreId {
|
impl From<PathBuf> for StoreId {
|
||||||
|
|
||||||
fn from(pb: PathBuf) -> StoreId {
|
fn from(pb: PathBuf) -> StoreId {
|
||||||
|
|
Loading…
Reference in a new issue