Skip to content

Commit

Permalink
clippy: fix a few lints
Browse files Browse the repository at this point in the history
  • Loading branch information
niklaslong committed Aug 27, 2023
1 parent f076f1d commit 44bfd57
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions node/narwhal/src/gateway.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ use tokio::{
task::{self, JoinHandle},
};
use tokio_stream::StreamExt;
use tokio_util::codec::{Framed, FramedParts};
use tokio_util::codec::Framed;

/// The maximum interval of events to cache.
const CACHE_EVENTS_INTERVAL: i64 = (MAX_BATCH_DELAY / 1000) as i64; // seconds
Expand Down Expand Up @@ -627,7 +627,7 @@ impl<N: Network> Handshake for Gateway<N> {

// Perform the handshake; we pass on a mutable reference to peer_ip in case the process is broken at any point in time.
let handshake_result = if peer_side == ConnectionSide::Responder {
self.handshake_inner_initiator(peer_addr, &mut peer_ip, stream).await
self.handshake_inner_initiator(peer_addr, peer_ip, stream).await
} else {
self.handshake_inner_responder(peer_addr, &mut peer_ip, stream).await
};
Expand Down Expand Up @@ -705,7 +705,7 @@ impl<N: Network> Gateway<N> {
async fn handshake_inner_initiator<'a>(
&'a self,
peer_addr: SocketAddr,
peer_ip: &mut Option<SocketAddr>,
peer_ip: Option<SocketAddr>,
stream: &'a mut TcpStream,
) -> io::Result<(SocketAddr, Framed<&mut TcpStream, NoiseCodec<N>>)> {
// This value is immediately guaranteed to be present, so it can be unwrapped.
Expand Down

0 comments on commit 44bfd57

Please sign in to comment.