diff --git a/misc/allow-block-list/src/lib.rs b/misc/allow-block-list/src/lib.rs index 0e92addf256..5e177e69c47 100644 --- a/misc/allow-block-list/src/lib.rs +++ b/misc/allow-block-list/src/lib.rs @@ -277,8 +277,6 @@ where _: ConnectionId, event: THandlerOutEvent, ) { - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] libp2p_core::util::unreachable(event) } diff --git a/misc/connection-limits/src/lib.rs b/misc/connection-limits/src/lib.rs index bd95dd6760c..b0666c705cb 100644 --- a/misc/connection-limits/src/lib.rs +++ b/misc/connection-limits/src/lib.rs @@ -390,8 +390,6 @@ impl NetworkBehaviour for Behaviour { _: ConnectionId, event: THandlerOutEvent, ) { - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] libp2p_core::util::unreachable(event) } @@ -722,8 +720,6 @@ mod tests { _connection_id: ConnectionId, event: THandlerOutEvent, ) { - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] libp2p_core::util::unreachable(event) } diff --git a/misc/memory-connection-limits/src/lib.rs b/misc/memory-connection-limits/src/lib.rs index 28fa5598481..7905e39ac18 100644 --- a/misc/memory-connection-limits/src/lib.rs +++ b/misc/memory-connection-limits/src/lib.rs @@ -196,8 +196,6 @@ impl NetworkBehaviour for Behaviour { _: ConnectionId, event: THandlerOutEvent, ) { - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] libp2p_core::util::unreachable(event) } diff --git a/misc/memory-connection-limits/tests/util/mod.rs b/misc/memory-connection-limits/tests/util/mod.rs index 205f4d13bc4..b73352334da 100644 --- a/misc/memory-connection-limits/tests/util/mod.rs +++ b/misc/memory-connection-limits/tests/util/mod.rs @@ -118,8 +118,6 @@ impl NetworkBehaviour _: ConnectionId, event: THandlerOutEvent, ) { - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] libp2p_core::util::unreachable(event) } diff --git a/protocols/autonat/src/v2/client/handler/dial_back.rs b/protocols/autonat/src/v2/client/handler/dial_back.rs index 1e86b46152b..3fd3cf0b5ed 100644 --- a/protocols/autonat/src/v2/client/handler/dial_back.rs +++ b/protocols/autonat/src/v2/client/handler/dial_back.rs @@ -76,8 +76,6 @@ impl ConnectionHandler for Handler { tracing::warn!("Dial back request dropped, too many requests in flight"); } } - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] ConnectionEvent::ListenUpgradeError(ListenUpgradeError { error, .. }) => { libp2p_core::util::unreachable(error); } diff --git a/protocols/autonat/src/v2/client/handler/dial_request.rs b/protocols/autonat/src/v2/client/handler/dial_request.rs index 9fb54c87a49..3da96a1d01f 100644 --- a/protocols/autonat/src/v2/client/handler/dial_request.rs +++ b/protocols/autonat/src/v2/client/handler/dial_request.rs @@ -210,8 +210,6 @@ async fn start_stream_handle( .map_err(|e| match e { StreamUpgradeError::NegotiationFailed => Error::UnsupportedProtocol, StreamUpgradeError::Timeout => Error::Io(io::ErrorKind::TimedOut.into()), - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] StreamUpgradeError::Apply(v) => libp2p_core::util::unreachable(v), StreamUpgradeError::Io(e) => Error::Io(e), })?; diff --git a/protocols/autonat/src/v2/server/behaviour.rs b/protocols/autonat/src/v2/server/behaviour.rs index 125955cb53a..856d46a25c1 100644 --- a/protocols/autonat/src/v2/server/behaviour.rs +++ b/protocols/autonat/src/v2/server/behaviour.rs @@ -111,8 +111,6 @@ where Either::Left(Either::Left(Err(e))) => { tracing::debug!("dial back error: {e:?}"); } - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] Either::Left(Either::Right(v)) => libp2p_core::util::unreachable(v), Either::Right(Either::Left(cmd)) => { let addr = cmd.addr.clone(); diff --git a/protocols/autonat/src/v2/server/handler/dial_request.rs b/protocols/autonat/src/v2/server/handler/dial_request.rs index 22cab2b9cab..14e5189af49 100644 --- a/protocols/autonat/src/v2/server/handler/dial_request.rs +++ b/protocols/autonat/src/v2/server/handler/dial_request.rs @@ -137,8 +137,6 @@ where ); } } - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] ConnectionEvent::ListenUpgradeError(ListenUpgradeError { error, .. }) => { tracing::debug!("inbound request failed: {:?}", error); } diff --git a/protocols/dcutr/src/behaviour.rs b/protocols/dcutr/src/behaviour.rs index 989635c02ba..4985527aca2 100644 --- a/protocols/dcutr/src/behaviour.rs +++ b/protocols/dcutr/src/behaviour.rs @@ -319,8 +319,6 @@ impl NetworkBehaviour for Behaviour { .or_default() += 1; self.queued_events.push_back(ToSwarm::Dial { opts }); } - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] Either::Right(never) => libp2p_core::util::unreachable(never), }; } diff --git a/protocols/dcutr/src/handler/relayed.rs b/protocols/dcutr/src/handler/relayed.rs index 47813493e9e..af84d8fe9b1 100644 --- a/protocols/dcutr/src/handler/relayed.rs +++ b/protocols/dcutr/src/handler/relayed.rs @@ -117,8 +117,7 @@ impl Handler { self.attempts += 1; } // A connection listener denies all incoming substreams, thus none can ever be fully - // negotiated. TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] + // negotiated. future::Either::Right(output) => libp2p_core::util::unreachable(output), } } @@ -154,8 +153,6 @@ impl Handler { ::InboundProtocol, >, ) { - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] libp2p_core::util::unreachable(error.into_inner()); } @@ -167,8 +164,6 @@ impl Handler { >, ) { let error = match error { - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] StreamUpgradeError::Apply(v) => libp2p_core::util::unreachable(v), StreamUpgradeError::NegotiationFailed => outbound::Error::Unsupported, StreamUpgradeError::Io(e) => outbound::Error::Io(e), @@ -296,8 +291,6 @@ impl ConnectionHandler for Handler { ConnectionEvent::FullyNegotiatedOutbound(fully_negotiated_outbound) => { self.on_fully_negotiated_outbound(fully_negotiated_outbound) } - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] ConnectionEvent::ListenUpgradeError(listen_upgrade_error) => { self.on_listen_upgrade_error(listen_upgrade_error) } diff --git a/protocols/gossipsub/src/handler.rs b/protocols/gossipsub/src/handler.rs index f93e993a854..7dc15e97fc1 100644 --- a/protocols/gossipsub/src/handler.rs +++ b/protocols/gossipsub/src/handler.rs @@ -516,8 +516,6 @@ impl ConnectionHandler for Handler { .. }) => match protocol { Either::Left(protocol) => handler.on_fully_negotiated_inbound(protocol), - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] Either::Right(v) => libp2p_core::util::unreachable(v), }, ConnectionEvent::FullyNegotiatedOutbound(fully_negotiated_outbound) => { @@ -529,8 +527,6 @@ impl ConnectionHandler for Handler { }) => { tracing::debug!("Dial upgrade error: Protocol negotiation timeout"); } - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] ConnectionEvent::DialUpgradeError(DialUpgradeError { error: StreamUpgradeError::Apply(e), .. diff --git a/protocols/kad/src/handler.rs b/protocols/kad/src/handler.rs index a3bb19447cb..48b91e7a0c9 100644 --- a/protocols/kad/src/handler.rs +++ b/protocols/kad/src/handler.rs @@ -503,8 +503,6 @@ impl Handler { // is a `Infallible`. let protocol = match protocol { future::Either::Left(p) => p, - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] future::Either::Right(p) => libp2p_core::util::unreachable(p), }; diff --git a/protocols/perf/src/client/handler.rs b/protocols/perf/src/client/handler.rs index 043790822b5..b45cdaa8208 100644 --- a/protocols/perf/src/client/handler.rs +++ b/protocols/perf/src/client/handler.rs @@ -109,8 +109,6 @@ impl ConnectionHandler for Handler { event: ConnectionEvent, ) { match event { - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] ConnectionEvent::FullyNegotiatedInbound(FullyNegotiatedInbound { protocol, .. }) => libp2p_core::util::unreachable(protocol), @@ -143,8 +141,6 @@ impl ConnectionHandler for Handler { result: Err(error.into()), })); } - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] ConnectionEvent::ListenUpgradeError(ListenUpgradeError { info: (), error }) => { libp2p_core::util::unreachable(error) } diff --git a/protocols/perf/src/server/handler.rs b/protocols/perf/src/server/handler.rs index 6ecb19dbc18..2748a5b6ad9 100644 --- a/protocols/perf/src/server/handler.rs +++ b/protocols/perf/src/server/handler.rs @@ -75,8 +75,6 @@ impl ConnectionHandler for Handler { } fn on_behaviour_event(&mut self, v: Self::FromBehaviour) { - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] libp2p_core::util::unreachable(v) } @@ -97,22 +95,16 @@ impl ConnectionHandler for Handler { tracing::warn!("Dropping inbound stream because we are at capacity"); } } - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] ConnectionEvent::FullyNegotiatedOutbound(FullyNegotiatedOutbound { info, .. }) => { libp2p_core::util::unreachable(info) } - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] ConnectionEvent::DialUpgradeError(DialUpgradeError { info, .. }) => { libp2p_core::util::unreachable(info) } ConnectionEvent::AddressChange(_) | ConnectionEvent::LocalProtocolsChange(_) | ConnectionEvent::RemoteProtocolsChange(_) => {} - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] ConnectionEvent::ListenUpgradeError(ListenUpgradeError { info: (), error }) => { libp2p_core::util::unreachable(error) } diff --git a/protocols/ping/src/handler.rs b/protocols/ping/src/handler.rs index 510ff0553de..bc7c9d4e6bc 100644 --- a/protocols/ping/src/handler.rs +++ b/protocols/ping/src/handler.rs @@ -211,8 +211,6 @@ impl Handler { "ping protocol negotiation timed out", )), }, - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] StreamUpgradeError::Apply(e) => libp2p_core::util::unreachable(e), StreamUpgradeError::Io(e) => Failure::Other { error: Box::new(e) }, }; diff --git a/protocols/relay/src/behaviour.rs b/protocols/relay/src/behaviour.rs index 5083d9e14a0..9c768c6022d 100644 --- a/protocols/relay/src/behaviour.rs +++ b/protocols/relay/src/behaviour.rs @@ -379,8 +379,6 @@ impl NetworkBehaviour for Behaviour { ) { let event = match event { Either::Left(e) => e, - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] Either::Right(v) => libp2p_core::util::unreachable(v), }; diff --git a/protocols/relay/src/behaviour/handler.rs b/protocols/relay/src/behaviour/handler.rs index d714bf04fc9..fb80112e71c 100644 --- a/protocols/relay/src/behaviour/handler.rs +++ b/protocols/relay/src/behaviour/handler.rs @@ -455,8 +455,6 @@ impl Handler { StreamUpgradeError::Timeout => outbound_stop::Error::Io(io::ErrorKind::TimedOut.into()), StreamUpgradeError::NegotiationFailed => outbound_stop::Error::Unsupported, StreamUpgradeError::Io(e) => outbound_stop::Error::Io(e), - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] StreamUpgradeError::Apply(v) => libp2p_core::util::unreachable(v), }; diff --git a/protocols/relay/src/priv_client.rs b/protocols/relay/src/priv_client.rs index b8be01a2ea0..627c521320a 100644 --- a/protocols/relay/src/priv_client.rs +++ b/protocols/relay/src/priv_client.rs @@ -237,8 +237,6 @@ impl NetworkBehaviour for Behaviour { ) { let handler_event = match handler_event { Either::Left(e) => e, - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] Either::Right(v) => libp2p_core::util::unreachable(v), }; diff --git a/protocols/relay/src/priv_client/handler.rs b/protocols/relay/src/priv_client/handler.rs index d2e4db56b4c..5f46dbf4460 100644 --- a/protocols/relay/src/priv_client/handler.rs +++ b/protocols/relay/src/priv_client/handler.rs @@ -444,8 +444,6 @@ impl ConnectionHandler for Handler { let _ = next.send(Ok(ev.protocol)); } } - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] ConnectionEvent::ListenUpgradeError(ev) => libp2p_core::util::unreachable(ev.error), ConnectionEvent::DialUpgradeError(ev) => { if let Some(next) = self.pending_streams.pop_front() { @@ -584,8 +582,6 @@ fn into_reserve_error(e: StreamUpgradeError) -> outbound_hop::Reserv StreamUpgradeError::Timeout => { outbound_hop::ReserveError::Io(io::ErrorKind::TimedOut.into()) } - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] StreamUpgradeError::Apply(never) => libp2p_core::util::unreachable(never), StreamUpgradeError::NegotiationFailed => outbound_hop::ReserveError::Unsupported, StreamUpgradeError::Io(e) => outbound_hop::ReserveError::Io(e), @@ -597,8 +593,6 @@ fn into_connect_error(e: StreamUpgradeError) -> outbound_hop::Connec StreamUpgradeError::Timeout => { outbound_hop::ConnectError::Io(io::ErrorKind::TimedOut.into()) } - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] StreamUpgradeError::Apply(never) => libp2p_core::util::unreachable(never), StreamUpgradeError::NegotiationFailed => outbound_hop::ConnectError::Unsupported, StreamUpgradeError::Io(e) => outbound_hop::ConnectError::Io(e), diff --git a/protocols/request-response/src/cbor.rs b/protocols/request-response/src/cbor.rs index c4f9a204470..f20fbfb5dff 100644 --- a/protocols/request-response/src/cbor.rs +++ b/protocols/request-response/src/cbor.rs @@ -179,8 +179,6 @@ pub mod codec { fn decode_into_io_error(err: cbor4ii::serde::DecodeError) -> io::Error { match err { - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] cbor4ii::serde::DecodeError::Core(DecodeError::Read(e)) => { io::Error::new(io::ErrorKind::Other, e) } diff --git a/protocols/request-response/src/handler.rs b/protocols/request-response/src/handler.rs index d70ddc5c0ae..b7992abe9c8 100644 --- a/protocols/request-response/src/handler.rs +++ b/protocols/request-response/src/handler.rs @@ -236,8 +236,6 @@ where self.pending_events .push_back(Event::OutboundUnsupportedProtocols(message.request_id)); } - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] StreamUpgradeError::Apply(e) => libp2p_core::util::unreachable(e), StreamUpgradeError::Io(e) => { self.pending_events.push_back(Event::OutboundStreamFailed { @@ -254,8 +252,6 @@ where ::InboundProtocol, >, ) { - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] libp2p_core::util::unreachable(error) } } @@ -479,8 +475,6 @@ where ConnectionEvent::DialUpgradeError(dial_upgrade_error) => { self.on_dial_upgrade_error(dial_upgrade_error) } - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] ConnectionEvent::ListenUpgradeError(listen_upgrade_error) => { self.on_listen_upgrade_error(listen_upgrade_error) } diff --git a/protocols/stream/src/handler.rs b/protocols/stream/src/handler.rs index 5fc903f5980..a0255c7cba6 100644 --- a/protocols/stream/src/handler.rs +++ b/protocols/stream/src/handler.rs @@ -89,8 +89,6 @@ impl ConnectionHandler for Handler { } fn on_behaviour_event(&mut self, event: Self::FromBehaviour) { - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] libp2p_core::util::unreachable(event) } @@ -133,8 +131,6 @@ impl ConnectionHandler for Handler { swarm::StreamUpgradeError::Timeout => { OpenStreamError::Io(io::Error::from(io::ErrorKind::TimedOut)) } - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] swarm::StreamUpgradeError::Apply(v) => libp2p_core::util::unreachable(v), swarm::StreamUpgradeError::NegotiationFailed => { OpenStreamError::UnsupportedProtocol(p) diff --git a/swarm/src/behaviour/toggle.rs b/swarm/src/behaviour/toggle.rs index af2bbe981b7..03cf062416f 100644 --- a/swarm/src/behaviour/toggle.rs +++ b/swarm/src/behaviour/toggle.rs @@ -212,8 +212,6 @@ where ) { let out = match out { future::Either::Left(out) => out, - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] future::Either::Right(v) => libp2p_core::util::unreachable(v), }; @@ -254,8 +252,6 @@ where let err = match err { Either::Left(e) => e, - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] Either::Right(v) => libp2p_core::util::unreachable(v), }; diff --git a/swarm/src/connection.rs b/swarm/src/connection.rs index de8ff070273..f0bac724942 100644 --- a/swarm/src/connection.rs +++ b/swarm/src/connection.rs @@ -1203,14 +1203,10 @@ mod tests { event: ConnectionEvent, ) { match event { - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] ConnectionEvent::FullyNegotiatedInbound(FullyNegotiatedInbound { protocol, .. }) => libp2p_core::util::unreachable(protocol), - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] ConnectionEvent::FullyNegotiatedOutbound(FullyNegotiatedOutbound { protocol, .. @@ -1218,8 +1214,6 @@ mod tests { ConnectionEvent::DialUpgradeError(DialUpgradeError { error, .. }) => { self.error = Some(error) } - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] ConnectionEvent::AddressChange(_) | ConnectionEvent::ListenUpgradeError(_) | ConnectionEvent::LocalProtocolsChange(_) @@ -1228,8 +1222,6 @@ mod tests { } fn on_behaviour_event(&mut self, event: Self::FromBehaviour) { - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] libp2p_core::util::unreachable(event) } @@ -1292,8 +1284,6 @@ mod tests { } fn on_behaviour_event(&mut self, event: Self::FromBehaviour) { - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] libp2p_core::util::unreachable(event) } diff --git a/swarm/src/connection/pool/task.rs b/swarm/src/connection/pool/task.rs index 3a82e5c11d1..c3f15e8ede7 100644 --- a/swarm/src/connection/pool/task.rs +++ b/swarm/src/connection/pool/task.rs @@ -106,8 +106,6 @@ pub(crate) async fn new_for_pending_outgoing_connection( }) .await; } - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] Either::Left((Ok(v), _)) => libp2p_core::util::unreachable(v), Either::Right((Ok((address, output, errors)), _)) => { let _ = events @@ -146,8 +144,6 @@ pub(crate) async fn new_for_pending_incoming_connection( }) .await; } - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] Either::Left((Ok(v), _)) => libp2p_core::util::unreachable(v), Either::Right((Ok(output), _)) => { let _ = events diff --git a/swarm/src/dummy.rs b/swarm/src/dummy.rs index f8137bdbeee..e6f12b41d2c 100644 --- a/swarm/src/dummy.rs +++ b/swarm/src/dummy.rs @@ -48,8 +48,6 @@ impl NetworkBehaviour for Behaviour { _: ConnectionId, event: THandlerOutEvent, ) { - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] libp2p_core::util::unreachable(event) } @@ -78,8 +76,6 @@ impl crate::handler::ConnectionHandler for ConnectionHandler { } fn on_behaviour_event(&mut self, event: Self::FromBehaviour) { - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] libp2p_core::util::unreachable(event) } @@ -95,29 +91,19 @@ impl crate::handler::ConnectionHandler for ConnectionHandler { event: ConnectionEvent, ) { match event { - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] ConnectionEvent::FullyNegotiatedInbound(FullyNegotiatedInbound { protocol, .. }) => libp2p_core::util::unreachable(protocol), - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] ConnectionEvent::FullyNegotiatedOutbound(FullyNegotiatedOutbound { protocol, .. }) => libp2p_core::util::unreachable(protocol), - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] ConnectionEvent::DialUpgradeError(DialUpgradeError { info: _, error }) => match error { - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] StreamUpgradeError::Timeout => unreachable!(), StreamUpgradeError::Apply(e) => libp2p_core::util::unreachable(e), StreamUpgradeError::NegotiationFailed | StreamUpgradeError::Io(_) => { unreachable!("Denied upgrade does not support any protocols") } }, - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] ConnectionEvent::AddressChange(_) | ConnectionEvent::ListenUpgradeError(_) | ConnectionEvent::LocalProtocolsChange(_) diff --git a/swarm/src/handler/pending.rs b/swarm/src/handler/pending.rs index 8223c544593..0d9191f2de5 100644 --- a/swarm/src/handler/pending.rs +++ b/swarm/src/handler/pending.rs @@ -56,8 +56,6 @@ impl ConnectionHandler for PendingConnectionHandler { } fn on_behaviour_event(&mut self, v: Self::FromBehaviour) { - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] libp2p_core::util::unreachable(v) } @@ -73,13 +71,9 @@ impl ConnectionHandler for PendingConnectionHandler { event: ConnectionEvent, ) { match event { - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] ConnectionEvent::FullyNegotiatedInbound(FullyNegotiatedInbound { protocol, .. }) => libp2p_core::util::unreachable(protocol), - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] ConnectionEvent::FullyNegotiatedOutbound(FullyNegotiatedOutbound { protocol, info: _info, @@ -90,8 +84,6 @@ impl ConnectionHandler for PendingConnectionHandler { libp2p_core::util::unreachable(_info); } } - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] ConnectionEvent::AddressChange(_) | ConnectionEvent::DialUpgradeError(_) | ConnectionEvent::ListenUpgradeError(_) diff --git a/swarm/tests/swarm_derive.rs b/swarm/tests/swarm_derive.rs index a1c8bc5ff73..e297f2f4afa 100644 --- a/swarm/tests/swarm_derive.rs +++ b/swarm/tests/swarm_derive.rs @@ -578,8 +578,6 @@ fn custom_out_event_no_type_parameters() { _connection: ConnectionId, message: THandlerOutEvent, ) { - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] libp2p_core::util::unreachable(message); } diff --git a/transports/quic/src/hole_punching.rs b/transports/quic/src/hole_punching.rs index 6f1961081d2..48d1494c95c 100644 --- a/transports/quic/src/hole_punching.rs +++ b/transports/quic/src/hole_punching.rs @@ -19,8 +19,6 @@ pub(crate) async fn hole_puncher( match futures::future::select(P::sleep(timeout_duration), punch_holes_future).await { Either::Left(_) => Error::HandshakeTimedOut, Either::Right((Err(hole_punch_err), _)) => hole_punch_err, - // TODO: remove when Rust 1.82 is MSRV - #[allow(unreachable_patterns)] Either::Right((Ok(never), _)) => match never {}, } }