mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-07 03:55:28 +00:00
fix clippy warning
This commit is contained in:
parent
674816ad5b
commit
c32cbd8c7b
@ -29,9 +29,6 @@ mod utf8 {
|
|||||||
|
|
||||||
/// Filter out list of paths that are not utf8 valid
|
/// Filter out list of paths that are not utf8 valid
|
||||||
pub fn get_invalid_utf8_paths(paths: &[PathBuf]) -> Vec<&PathBuf> {
|
pub fn get_invalid_utf8_paths(paths: &[PathBuf]) -> Vec<&PathBuf> {
|
||||||
paths
|
paths.iter().filter(|path| is_invalid_utf8(path)).collect()
|
||||||
.iter()
|
|
||||||
.filter_map(|path| is_invalid_utf8(path).then_some(path))
|
|
||||||
.collect()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user