diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-06-05 13:43:16 -0400 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-06-05 13:43:16 -0400 |
commit | 8799211cf9e7547416618725a86463444ed9e342 (patch) | |
tree | dfb3b73905a48f341051585845214589b07d21b2 /src/sort.rs | |
parent | 724ec36a7ab0dadb0229b9a16eb6179b032be39d (diff) |
replace unnecessary path copying with references instead
Diffstat (limited to 'src/sort.rs')
-rw-r--r-- | src/sort.rs | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/sort.rs b/src/sort.rs index 9985eef..acc474e 100644 --- a/src/sort.rs +++ b/src/sort.rs @@ -107,16 +107,6 @@ fn filter_hidden(result: &Result<fs::DirEntry, std::io::Error>) -> bool { } } -pub fn map_entry_default(result: Result<fs::DirEntry, std::io::Error>) -> Option<JoshutoDirEntry> { - match result { - Ok(direntry) => match JoshutoDirEntry::from(&direntry) { - Ok(s) => Some(s), - Err(_) => None, - }, - Err(_) => None, - } -} - const fn dummy_dir_first(_: &JoshutoDirEntry, _: &JoshutoDirEntry) -> cmp::Ordering { cmp::Ordering::Equal } |