diff options
author | David Peter <mail@david-peter.de> | 2021-11-14 09:44:40 +0100 |
---|---|---|
committer | David Peter <sharkdp@users.noreply.github.com> | 2021-11-14 09:51:41 +0100 |
commit | 14c9b1a7487266c4395cef1bfa1d5caab387fd01 (patch) | |
tree | d82cc96076059a278a7ac80ce4352c5ac723120d /src/walk.rs | |
parent | f146a3f5ca24ad2c66147b5ec05dd1b37480159b (diff) |
Fix clippy warnings
Diffstat (limited to 'src/walk.rs')
-rw-r--r-- | src/walk.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/walk.rs b/src/walk.rs index 64ea982..15a4aa5 100644 --- a/src/walk.rs +++ b/src/walk.rs @@ -33,10 +33,8 @@ fn walk(tx: channel::Sender<Message>, entries: &[PathBuf], filesize_type: Filesi let mut children = vec![]; match fs::read_dir(entry) { Ok(child_entries) => { - for child_entry in child_entries { - if let Ok(child_entry) = child_entry { - children.push(child_entry.path()); - } + for child_entry in child_entries.flatten() { + children.push(child_entry.path()); } } Err(_) => { |