mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
clippy fixes (#9173)
This commit is contained in:
@@ -101,7 +101,7 @@ mod inner {
|
||||
/// Proxy function to mpsc::UnboundedSender
|
||||
pub fn unbounded_send(&self, msg: T) -> Result<(), TrySendError<T>> {
|
||||
self.1.unbounded_send(msg).map(|s| {
|
||||
UNBOUNDED_CHANNELS_COUNTER.with_label_values(&[self.0, &"send"]).inc();
|
||||
UNBOUNDED_CHANNELS_COUNTER.with_label_values(&[self.0, "send"]).inc();
|
||||
s
|
||||
})
|
||||
}
|
||||
@@ -128,9 +128,7 @@ mod inner {
|
||||
}
|
||||
// and discount the messages
|
||||
if count > 0 {
|
||||
UNBOUNDED_CHANNELS_COUNTER
|
||||
.with_label_values(&[self.0, &"dropped"])
|
||||
.inc_by(count);
|
||||
UNBOUNDED_CHANNELS_COUNTER.with_label_values(&[self.0, "dropped"]).inc_by(count);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +144,7 @@ mod inner {
|
||||
pub fn try_next(&mut self) -> Result<Option<T>, TryRecvError> {
|
||||
self.1.try_next().map(|s| {
|
||||
if s.is_some() {
|
||||
UNBOUNDED_CHANNELS_COUNTER.with_label_values(&[self.0, &"received"]).inc();
|
||||
UNBOUNDED_CHANNELS_COUNTER.with_label_values(&[self.0, "received"]).inc();
|
||||
}
|
||||
s
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user