Enable clippy::unnecessary_filter_map
(#8738)
This PR enables the [`clippy::unnecessary_filter_map`](https://rust-lang.github.io/rust-clippy/master/index.html#/unnecessary_filter_map) rule and fixes the outstanding violations. Release Notes: - N/A
This commit is contained in:
parent
a17c207217
commit
f79f56f8b4
7 changed files with 34 additions and 46 deletions
|
@ -441,17 +441,13 @@ impl CollabPanel {
|
|||
// Populate remote participants.
|
||||
self.match_candidates.clear();
|
||||
self.match_candidates
|
||||
.extend(
|
||||
room.remote_participants()
|
||||
.iter()
|
||||
.filter_map(|(_, participant)| {
|
||||
Some(StringMatchCandidate {
|
||||
id: participant.user.id as usize,
|
||||
string: participant.user.github_login.clone(),
|
||||
char_bag: participant.user.github_login.chars().collect(),
|
||||
})
|
||||
}),
|
||||
);
|
||||
.extend(room.remote_participants().values().map(|participant| {
|
||||
StringMatchCandidate {
|
||||
id: participant.user.id as usize,
|
||||
string: participant.user.github_login.clone(),
|
||||
char_bag: participant.user.github_login.chars().collect(),
|
||||
}
|
||||
}));
|
||||
let mut matches = executor.block(match_strings(
|
||||
&self.match_candidates,
|
||||
&query,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue