mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
Rust 1.85 lints (#7019)
N/A 2 changes: 1. Replace Option::map_or(true, ...) with is_none_or(...) 2. Remove unnecessary `Into::into` blocks where the type conversion is apparent from the types
This commit is contained in:
@@ -201,7 +201,7 @@ impl<E: EthSpec> NetworkBehaviour for PeerManager<E> {
|
||||
.peers
|
||||
.read()
|
||||
.peer_info(&peer_id)
|
||||
.map_or(true, |peer| !peer.has_future_duty())
|
||||
.is_none_or(|peer| !peer.has_future_duty())
|
||||
{
|
||||
return Err(ConnectionDenied::new(
|
||||
"Connection to peer rejected: too many connections",
|
||||
@@ -240,7 +240,7 @@ impl<E: EthSpec> NetworkBehaviour for PeerManager<E> {
|
||||
.peers
|
||||
.read()
|
||||
.peer_info(&peer_id)
|
||||
.map_or(true, |peer| !peer.has_future_duty())
|
||||
.is_none_or(|peer| !peer.has_future_duty())
|
||||
{
|
||||
return Err(ConnectionDenied::new(
|
||||
"Connection to peer rejected: too many connections",
|
||||
|
||||
Reference in New Issue
Block a user