Skip to content

Commit

Permalink
Fix styling in one more place
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrit committed Sep 22, 2023
1 parent be0128a commit 25eca1a
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions crates/net/network/src/session/active.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,14 +356,8 @@ impl ActiveSession {

/// Notify the manager that the peer sent a bad message
fn on_bad_message(&self) {
let sender = self.to_session_manager.inner().get_ref();
if sender.is_none() {
return
}

let _ = sender
.unwrap()
.try_send(ActiveSessionMessage::BadMessage { peer_id: self.remote_peer_id });
let Some(sender) = self.to_session_manager.inner().get_ref() else { return };
let _ = sender.try_send(ActiveSessionMessage::BadMessage { peer_id: self.remote_peer_id });
}

/// Report back that this session has been closed.
Expand Down

0 comments on commit 25eca1a

Please sign in to comment.