mirror of
https://github.com/lsd-rs/lsd
synced 2024-11-10 14:24:27 +00:00
Fix compilation bug
This commit is contained in:
parent
fa58b3c011
commit
e5c21c659c
1 changed files with 4 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue