Enable clippy::filter_map_identity
(#8741)
This PR enables the [`clippy::filter_map_identity`](https://rust-lang.github.io/rust-clippy/master/index.html#/filter_map_identity) rule and fixes the outstanding violations. Release Notes: - N/A
This commit is contained in:
parent
3e287911c3
commit
2bfc646f33
3 changed files with 2 additions and 6 deletions
|
@ -7002,7 +7002,7 @@ impl Project {
|
||||||
.spawn(async move {
|
.spawn(async move {
|
||||||
future_buffers
|
future_buffers
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter_map(|e| e)
|
.flatten()
|
||||||
.chain(current_buffers)
|
.chain(current_buffers)
|
||||||
.filter_map(|(buffer, path)| {
|
.filter_map(|(buffer, path)| {
|
||||||
let (work_directory, repo) =
|
let (work_directory, repo) =
|
||||||
|
|
|
@ -325,10 +325,7 @@ impl PickerDelegate for RecentProjectsDelegate {
|
||||||
.unzip();
|
.unzip();
|
||||||
|
|
||||||
let highlighted_match = HighlightedMatchWithPaths {
|
let highlighted_match = HighlightedMatchWithPaths {
|
||||||
match_label: HighlightedText::join(
|
match_label: HighlightedText::join(match_labels.into_iter().flatten(), ", "),
|
||||||
match_labels.into_iter().filter_map(|name| name),
|
|
||||||
", ",
|
|
||||||
),
|
|
||||||
paths: if self.render_paths { paths } else { Vec::new() },
|
paths: if self.render_paths { paths } else { Vec::new() },
|
||||||
};
|
};
|
||||||
Some(
|
Some(
|
||||||
|
|
|
@ -95,7 +95,6 @@ fn run_clippy(args: ClippyArgs) -> Result<()> {
|
||||||
"clippy::explicit_auto_deref",
|
"clippy::explicit_auto_deref",
|
||||||
"clippy::explicit_counter_loop",
|
"clippy::explicit_counter_loop",
|
||||||
"clippy::extra_unused_lifetimes",
|
"clippy::extra_unused_lifetimes",
|
||||||
"clippy::filter_map_identity",
|
|
||||||
"clippy::identity_op",
|
"clippy::identity_op",
|
||||||
"clippy::implied_bounds_in_impls",
|
"clippy::implied_bounds_in_impls",
|
||||||
"clippy::iter_kv_map",
|
"clippy::iter_kv_map",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue