forked from mirrors/jj
style: use .filter_map()
instead of .flat_map()
where appropriate
This commit is contained in:
parent
12f4d6d17b
commit
43711de61c
2 changed files with 2 additions and 1 deletions
|
@ -134,6 +134,7 @@ testutils = { path = "lib/testutils" }
|
|||
|
||||
[workspace.lints.clippy]
|
||||
explicit_iter_loop = "warn"
|
||||
flat_map_option = "warn"
|
||||
implicit_clone = "warn"
|
||||
semicolon_if_nothing_returned = "warn"
|
||||
uninlined_format_args = "warn"
|
||||
|
|
|
@ -297,7 +297,7 @@ impl FilesetExpression {
|
|||
pub fn explicit_paths(&self) -> impl Iterator<Item = &RepoPath> {
|
||||
// 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,
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue