Skip to content

Commit abae6d6

Browse files
committed
address build with --no-default-features
1 parent 6e514e3 commit abae6d6

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

protocols/gossipsub/src/behaviour.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3214,6 +3214,8 @@ where
32143214
}
32153215
}
32163216
}
3217+
// rpc is only used for metrics code
3218+
#[allow(unused_variables)]
32173219
HandlerEvent::MessagesDropped(rpc) => {
32183220
// Account for this in the scoring logic
32193221
if let PeerScoreState::Active(peer_score) = &mut self.peer_score {

protocols/gossipsub/src/queue.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ impl<T: Ord> Queue<T> {
116116
}
117117

118118
/// Returns the length of the queue.
119+
#[cfg(feature = "metrics")]
119120
pub(crate) fn len(&self) -> usize {
120121
let shared = self.shared.lock().expect("lock to not be poisoned");
121122
shared.queue.len()

0 commit comments

Comments
 (0)