Auto-fix clippy::collapsible_if violations (#36428)
Release Notes: - N/A
This commit is contained in:
parent
9e8ec72bd5
commit
8f567383e4
281 changed files with 6628 additions and 7089 deletions
|
@ -48,10 +48,10 @@ impl Notification {
|
|||
let Some(Value::String(kind)) = value.remove(KIND) else {
|
||||
unreachable!("kind is the enum tag")
|
||||
};
|
||||
if let map::Entry::Occupied(e) = value.entry(ENTITY_ID) {
|
||||
if e.get().is_u64() {
|
||||
entity_id = e.remove().as_u64();
|
||||
}
|
||||
if let map::Entry::Occupied(e) = value.entry(ENTITY_ID)
|
||||
&& e.get().is_u64()
|
||||
{
|
||||
entity_id = e.remove().as_u64();
|
||||
}
|
||||
proto::Notification {
|
||||
kind,
|
||||
|
|
|
@ -520,10 +520,10 @@ impl Peer {
|
|||
&response.payload
|
||||
{
|
||||
// Remove the transmitting end of the response channel to end the stream.
|
||||
if let Some(channels) = stream_response_channels.upgrade() {
|
||||
if let Some(channels) = channels.lock().as_mut() {
|
||||
channels.remove(&message_id);
|
||||
}
|
||||
if let Some(channels) = stream_response_channels.upgrade()
|
||||
&& let Some(channels) = channels.lock().as_mut()
|
||||
{
|
||||
channels.remove(&message_id);
|
||||
}
|
||||
None
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue