mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-29 17:51:35 +00:00
feat(ci): lint against usages of variables with underscore
Prefixing a variable with an underscore (`_`) in Rust indicates that it is not used. Through refactorings, it can sometimes happen that we do end up using such a variable. In this case, the underscore should be removed. Clippy can help us with this. Pull-Request: #3484.
This commit is contained in:
@ -563,7 +563,7 @@ impl PeerScore {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn validate_message(&mut self, _from: &PeerId, msg_id: &MessageId, topic_hash: &TopicHash) {
|
||||
pub fn validate_message(&mut self, from: &PeerId, msg_id: &MessageId, topic_hash: &TopicHash) {
|
||||
// adds an empty record with the message id
|
||||
self.deliveries
|
||||
.entry(msg_id.clone())
|
||||
@ -572,12 +572,12 @@ impl PeerScore {
|
||||
if let Some(callback) = self.message_delivery_time_callback {
|
||||
if self
|
||||
.peer_stats
|
||||
.get(_from)
|
||||
.get(from)
|
||||
.and_then(|s| s.topics.get(topic_hash))
|
||||
.map(|ts| ts.in_mesh())
|
||||
.unwrap_or(false)
|
||||
{
|
||||
callback(_from, topic_hash, 0.0);
|
||||
callback(from, topic_hash, 0.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user