Open
Description
Lint name: if_same_then_else
I tried this code: https://github.com/deltachat/deltachat-core-rust/blob/master/src/message.rs#L1081-L1091
if chat.id.is_deaddrop() {
if let Some(contact) = contact {
self.text1 = Some(msg.get_sender_name(contact));
} else {
self.text1 = None;
}
} else if let Some(contact) = contact {
self.text1 = Some(msg.get_sender_name(contact));
} else {
self.text1 = None;
}
I expected to see this happen: detect that chat.id.is_deaddrop()
condition could be removed.
Instead, this happened: clippy did not detect anything.
Meta
cargo clippy -V
: clippy 0.0.212 (e1884a8 2020-12-29)rustc -Vv
:rustc 1.49.0 (e1884a8e3 2020-12-29) binary: rustc commit-hash: e1884a8e3c3e813aada8254edfa120e85bf5ffca commit-date: 2020-12-29 host: x86_64-unknown-linux-gnu release: 1.49.0