diff --git a/Cargo.toml b/Cargo.toml index 819f417c14..4bda1245b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -134,6 +134,7 @@ testutils = { path = "lib/testutils" } [workspace.lints.clippy] explicit_iter_loop = "deny" +flat_map_option = "deny" implicit_clone = "deny" redundant_else = "deny" semicolon_if_nothing_returned = "deny" diff --git a/lib/src/fileset.rs b/lib/src/fileset.rs index dae932a6f9..18b78ad288 100644 --- a/lib/src/fileset.rs +++ b/lib/src/fileset.rs @@ -297,7 +297,7 @@ impl FilesetExpression { pub fn explicit_paths(&self) -> impl Iterator { // pre/post-ordering doesn't matter so long as children are visited from // left to right. - self.dfs_pre().flat_map(|expr| match expr { + self.dfs_pre().filter_map(|expr| match expr { FilesetExpression::Pattern(pattern) => pattern.as_path(), _ => None, })