mirror of
https://github.com/sigp/lighthouse.git
synced 2026-07-01 11:54:40 +00:00
Ignore Rust 1.82 warnings about void patterns (#6357)
* Ignore Rust 1.82 warnings about void patterns
This commit is contained in:
@@ -520,6 +520,7 @@ impl ConnectionHandler for Handler {
|
|||||||
..
|
..
|
||||||
}) => match protocol {
|
}) => match protocol {
|
||||||
Either::Left(protocol) => handler.on_fully_negotiated_inbound(protocol),
|
Either::Left(protocol) => handler.on_fully_negotiated_inbound(protocol),
|
||||||
|
#[allow(unreachable_patterns)]
|
||||||
Either::Right(v) => void::unreachable(v),
|
Either::Right(v) => void::unreachable(v),
|
||||||
},
|
},
|
||||||
ConnectionEvent::FullyNegotiatedOutbound(fully_negotiated_outbound) => {
|
ConnectionEvent::FullyNegotiatedOutbound(fully_negotiated_outbound) => {
|
||||||
@@ -531,6 +532,9 @@ impl ConnectionHandler for Handler {
|
|||||||
}) => {
|
}) => {
|
||||||
tracing::debug!("Dial upgrade error: Protocol negotiation timeout");
|
tracing::debug!("Dial upgrade error: Protocol negotiation timeout");
|
||||||
}
|
}
|
||||||
|
// This pattern is unreachable as of Rust 1.82, we can remove it once the
|
||||||
|
// MSRV is increased past that version.
|
||||||
|
#[allow(unreachable_patterns)]
|
||||||
ConnectionEvent::DialUpgradeError(DialUpgradeError {
|
ConnectionEvent::DialUpgradeError(DialUpgradeError {
|
||||||
error: StreamUpgradeError::Apply(e),
|
error: StreamUpgradeError::Apply(e),
|
||||||
..
|
..
|
||||||
|
|||||||
@@ -1809,6 +1809,7 @@ impl<E: EthSpec> Network<E> {
|
|||||||
self.inject_upnp_event(e);
|
self.inject_upnp_event(e);
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
#[allow(unreachable_patterns)]
|
||||||
BehaviourEvent::ConnectionLimits(le) => void::unreachable(le),
|
BehaviourEvent::ConnectionLimits(le) => void::unreachable(le),
|
||||||
},
|
},
|
||||||
SwarmEvent::ConnectionEstablished { .. } => None,
|
SwarmEvent::ConnectionEstablished { .. } => None,
|
||||||
|
|||||||
@@ -265,6 +265,8 @@ pub async fn convert_rejection<T: Reply>(res: Result<T, warp::Rejection>) -> Res
|
|||||||
Ok(response) => response.into_response(),
|
Ok(response) => response.into_response(),
|
||||||
Err(e) => match handle_rejection(e).await {
|
Err(e) => match handle_rejection(e).await {
|
||||||
Ok(reply) => reply.into_response(),
|
Ok(reply) => reply.into_response(),
|
||||||
|
// We can simplify this once Rust 1.82 is MSRV
|
||||||
|
#[allow(unreachable_patterns)]
|
||||||
Err(_) => warp::reply::with_status(
|
Err(_) => warp::reply::with_status(
|
||||||
warp::reply::json(&"unhandled error"),
|
warp::reply::json(&"unhandled error"),
|
||||||
eth2::StatusCode::INTERNAL_SERVER_ERROR,
|
eth2::StatusCode::INTERNAL_SERVER_ERROR,
|
||||||
|
|||||||
Reference in New Issue
Block a user