mirror of
https://github.com/lsd-rs/lsd
synced 2024-12-13 21:52:37 +00:00
minor refactor of return value
This commit is contained in:
parent
3def8d0238
commit
0f8b558493
1 changed files with 4 additions and 4 deletions
|
@ -192,10 +192,10 @@ impl Meta {
|
|||
// the link, but provides whether followed link is_dir. Broken links are files.
|
||||
(
|
||||
path.symlink_metadata()?,
|
||||
match path.metadata() {
|
||||
Ok(m) => Some(m.is_dir()),
|
||||
Err(_) => Some(false), // broken link
|
||||
},
|
||||
Some(match path.metadata() {
|
||||
Ok(m) => m.is_dir(),
|
||||
Err(_) => false, // broken link
|
||||
}),
|
||||
)
|
||||
} else {
|
||||
(path.metadata()?, None)
|
||||
|
|
Loading…
Reference in a new issue