Impl From<PathBuf> for FileID, using From<String> for FileID
This commit is contained in:
parent
db9c4e48ba
commit
915cbd24ef
1 changed files with 3 additions and 2 deletions
|
@ -179,8 +179,9 @@ impl From<PathBuf> for FileID {
|
||||||
|
|
||||||
impl<'a> From<&'a PathBuf> for FileID {
|
impl<'a> From<&'a PathBuf> for FileID {
|
||||||
|
|
||||||
fn from(s: &'a PathBuf) -> FileID {
|
fn from(pb: &'a PathBuf) -> FileID {
|
||||||
unimplemented!()
|
let s = pb.to_str().unwrap_or("");
|
||||||
|
FileID::from(String::from(s))
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue