Fix compilation bug

This commit is contained in:
Peltoche 2018-11-25 16:16:09 +01:00
parent fa58b3c011
commit e5c21c659c
No known key found for this signature in database
GPG key ID: CED68D0487156952

View file

@ -23,8 +23,8 @@ pub enum Type {
Directory,
}
impl From<Metadata> for Type {
fn from(meta: Metadata) -> Self {
impl<'a> From<&'a Metadata> for Type {
fn from(meta: &'a Metadata) -> Self {
if meta.is_dir() {
Type::Directory
} else {
@ -96,7 +96,8 @@ impl Meta {
}
};
(meta, Type::from(meta))
let node_type = Type::from(&meta);
(meta, node_type)
}
};