Skip to content

Commit

Permalink
Obey clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
azdavis committed Oct 12, 2023
1 parent 9f2b730 commit bc4bb79
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions crates/paths/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,7 @@ impl FileSystem for MemoryFileSystem {
}

fn read_dir(&self, path: &Path) -> std::io::Result<Vec<PathBuf>> {
Ok(
self.0.keys().filter_map(|p| (p.starts_with(path) && p != path).then(|| p.clone())).collect(),
)
Ok(self.0.keys().filter(|&p| p.starts_with(path) && p != path).cloned().collect())
}

fn is_file(&self, path: &Path) -> bool {
Expand Down

0 comments on commit bc4bb79

Please sign in to comment.