Auto-fix clippy::collapsible_if violations (#36428)

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-08-19 15:27:24 +02:00 committed by GitHub
parent 9e8ec72bd5
commit 8f567383e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
281 changed files with 6628 additions and 7089 deletions

View file

@ -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,

View file

@ -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 {