mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 04:48:21 +00:00
Rust 1.84 lints (#6781)
* Fix few lints * Fix remaining lints * Use fully qualified syntax
This commit is contained in:
@@ -124,7 +124,7 @@ impl BackoffStorage {
|
||||
pub(crate) fn is_backoff_with_slack(&self, topic: &TopicHash, peer: &PeerId) -> bool {
|
||||
self.backoffs
|
||||
.get(topic)
|
||||
.map_or(false, |m| m.contains_key(peer))
|
||||
.is_some_and(|m| m.contains_key(peer))
|
||||
}
|
||||
|
||||
pub(crate) fn get_backoff_time(&self, topic: &TopicHash, peer: &PeerId) -> Option<Instant> {
|
||||
|
||||
@@ -1770,8 +1770,7 @@ where
|
||||
// reject messages claiming to be from ourselves but not locally published
|
||||
let self_published = !self.config.allow_self_origin()
|
||||
&& if let Some(own_id) = self.publish_config.get_own_id() {
|
||||
own_id != propagation_source
|
||||
&& raw_message.source.as_ref().map_or(false, |s| s == own_id)
|
||||
own_id != propagation_source && raw_message.source.as_ref() == Some(own_id)
|
||||
} else {
|
||||
self.published_message_ids.contains(msg_id)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user