mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-04 15:07:47 +00:00
refactor/polish ~ fix cargo clippy
complaints (filter_map => filter)
This commit is contained in:
parent
de9d702a32
commit
f933c60a41
1 changed files with 2 additions and 6 deletions
|
@ -188,17 +188,13 @@ fn du(
|
|||
}
|
||||
}
|
||||
|
||||
stats.extend(futures.into_iter().flat_map(|val| val).rev().filter_map(
|
||||
stats.extend(futures.into_iter().flat_map(|val| val).rev().filter(
|
||||
|stat| {
|
||||
if !options.separate_dirs && stat.path.parent().unwrap() == my_stat.path {
|
||||
my_stat.size += stat.size;
|
||||
my_stat.blocks += stat.blocks;
|
||||
}
|
||||
if options.max_depth == None || depth < options.max_depth.unwrap() {
|
||||
Some(stat)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
options.max_depth == None || depth < options.max_depth.unwrap()
|
||||
},
|
||||
));
|
||||
stats.push(my_stat);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue