fix: apply clippy lint

This commit is contained in:
figsoda 2022-08-14 12:26:28 +08:00
parent a1c943923c
commit 996e597c1f

View File

@ -31,7 +31,7 @@ mod utf8 {
pub fn get_invalid_utf8_paths(paths: &[PathBuf]) -> Vec<&PathBuf> { pub fn get_invalid_utf8_paths(paths: &[PathBuf]) -> Vec<&PathBuf> {
paths paths
.iter() .iter()
.filter_map(|path| is_invalid_utf8(path).then(|| path)) .filter_map(|path| is_invalid_utf8(path).then_some(path))
.collect() .collect()
} }
} }