Skip to content

Commit

Permalink
fix: minor clippy error
Browse files Browse the repository at this point in the history
  • Loading branch information
sdbondi committed Oct 30, 2021
1 parent e585f31 commit adbd737
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
1 change: 1 addition & 0 deletions base_layer/p2p/src/comms_connector/pubsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ mod test {

assert_eq!(topic1b[0].a, 11);
assert_eq!(topic1b[1].a, 33);
assert_eq!(topic1b[1].b, "three three");

let topic2 = collect_stream!(sub2, take = 4, timeout = Duration::from_secs(10));

Expand Down
8 changes: 4 additions & 4 deletions base_layer/p2p/src/dns/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl DnsClient {
#[derive(Clone)]
pub struct Client<C> {
inner: C,
shutdown: Arc<Shutdown>,
_shutdown: Arc<Shutdown>,
}

impl Client<AsyncDnssecClient> {
Expand All @@ -121,7 +121,7 @@ impl Client<AsyncDnssecClient> {

Ok(Self {
inner: client,
shutdown: Arc::new(shutdown),
_shutdown: Arc::new(shutdown),
})
}
}
Expand All @@ -135,7 +135,7 @@ impl Client<AsyncClient> {

Ok(Self {
inner: client,
shutdown: Arc::new(shutdown),
_shutdown: Arc::new(shutdown),
})
}
}
Expand Down Expand Up @@ -165,7 +165,7 @@ mod mock {
let client = MockClientHandle::mock(messages);
Ok(Self {
inner: client,
shutdown: Arc::new(Shutdown::new()),
_shutdown: Arc::new(Shutdown::new()),
})
}
}
Expand Down
1 change: 0 additions & 1 deletion base_layer/p2p/src/services/liveness/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ pub struct LivenessState {
pongs_received: usize,
pings_sent: usize,
pongs_sent: usize,
num_active_peers: usize,

local_metadata: Metadata,
}
Expand Down
4 changes: 0 additions & 4 deletions comms/dht/src/network_discovery/discovering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,17 @@ const LOG_TARGET: &str = "comms::dht::network_discovery";
pub(super) struct Discovering {
params: DiscoveryParams,
context: NetworkDiscoveryContext,
candidate_peers: Vec<PeerConnection>,
stats: DhtNetworkDiscoveryRoundInfo,
neighbourhood_threshold: NodeDistance,
excluded_peers: Vec<NodeId>,
}

impl Discovering {
pub fn new(params: DiscoveryParams, context: NetworkDiscoveryContext) -> Self {
Self {
params,
context,
candidate_peers: Vec::new(),
stats: Default::default(),
neighbourhood_threshold: NodeDistance::max_distance(),
excluded_peers: Vec::new(),
}
}

Expand Down
6 changes: 3 additions & 3 deletions comms/src/multiplexing/yamux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl Control {
let stream = self.inner.open_stream().await?;
Ok(Substream {
stream: stream.compat(),
counter_guard,
_counter_guard: counter_guard,
})
}

Expand Down Expand Up @@ -193,7 +193,7 @@ impl Stream for IncomingSubstreams {
match futures::ready!(Pin::new(&mut self.inner).poll_recv(cx)) {
Some(stream) => Poll::Ready(Some(Substream {
stream: stream.compat(),
counter_guard: self.substream_counter.new_guard(),
_counter_guard: self.substream_counter.new_guard(),
})),
None => Poll::Ready(None),
}
Expand All @@ -209,7 +209,7 @@ impl Drop for IncomingSubstreams {
#[derive(Debug)]
pub struct Substream {
stream: Compat<yamux::Stream>,
counter_guard: AtomicRefCounterGuard,
_counter_guard: AtomicRefCounterGuard,
}

impl StreamId for Substream {
Expand Down

0 comments on commit adbd737

Please sign in to comment.