diff --git a/src/storage/file_id.rs b/src/storage/file_id.rs index afc28c0c..f05eaa4e 100644 --- a/src/storage/file_id.rs +++ b/src/storage/file_id.rs @@ -179,8 +179,9 @@ impl From for FileID { impl<'a> From<&'a PathBuf> for FileID { - fn from(s: &'a PathBuf) -> FileID { - unimplemented!() + fn from(pb: &'a PathBuf) -> FileID { + let s = pb.to_str().unwrap_or(""); + FileID::from(String::from(s)) } }