Enable clippy::unnecessary_find_map
(#8740)
This PR enables the [`clippy::unnecessary_find_map`](https://rust-lang.github.io/rust-clippy/master/index.html#/unnecessary_find_map) rule and fixes the outstanding violations. Release Notes: - N/A
This commit is contained in:
parent
503bebaacc
commit
3e287911c3
2 changed files with 2 additions and 7 deletions
|
@ -839,12 +839,8 @@ impl Render for ChatPanel {
|
||||||
let reply_message = self
|
let reply_message = self
|
||||||
.active_chat()
|
.active_chat()
|
||||||
.and_then(|active_chat| {
|
.and_then(|active_chat| {
|
||||||
active_chat.read(cx).messages().iter().find_map(|m| {
|
active_chat.read(cx).messages().iter().find(|message| {
|
||||||
if m.id == ChannelMessageId::Saved(reply_to_message_id) {
|
message.id == ChannelMessageId::Saved(reply_to_message_id)
|
||||||
Some(m)
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.cloned();
|
.cloned();
|
||||||
|
|
|
@ -123,7 +123,6 @@ fn run_clippy(args: ClippyArgs) -> Result<()> {
|
||||||
"clippy::suspicious_to_owned",
|
"clippy::suspicious_to_owned",
|
||||||
"clippy::type_complexity",
|
"clippy::type_complexity",
|
||||||
"clippy::unit_arg",
|
"clippy::unit_arg",
|
||||||
"clippy::unnecessary_find_map",
|
|
||||||
"clippy::unnecessary_operation",
|
"clippy::unnecessary_operation",
|
||||||
"clippy::unnecessary_to_owned",
|
"clippy::unnecessary_to_owned",
|
||||||
"clippy::unnecessary_unwrap",
|
"clippy::unnecessary_unwrap",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue