diff --git a/core/src/lib.rs b/core/src/lib.rs index a1148004..6d18485c 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -125,7 +125,7 @@ pub use peer_record::PeerRecord; pub use signed_envelope::SignedEnvelope; pub use translation::address_translation; pub use transport::Transport; -pub use upgrade::{InboundUpgrade, OutboundUpgrade, UpgradeError, UpgradeInfo}; +pub use upgrade::{InboundUpgrade, OutboundUpgrade, UpgradeInfo}; #[derive(Debug, thiserror::Error)] #[error(transparent)] diff --git a/core/src/upgrade.rs b/core/src/upgrade.rs index 8219ac03..f6bf72d1 100644 --- a/core/src/upgrade.rs +++ b/core/src/upgrade.rs @@ -69,11 +69,11 @@ mod transfer; pub(crate) use apply::{ apply, apply_inbound, apply_outbound, InboundUpgradeApply, OutboundUpgradeApply, }; +pub(crate) use error::UpgradeError; use futures::future::Future; pub use self::{ denied::DeniedUpgrade, - error::UpgradeError, pending::PendingUpgrade, ready::ReadyUpgrade, select::SelectUpgrade, diff --git a/swarm/src/lib.rs b/swarm/src/lib.rs index 9f1784f8..ff54ae58 100644 --- a/swarm/src/lib.rs +++ b/swarm/src/lib.rs @@ -1776,20 +1776,18 @@ fn p2p_addr(peer: Option, addr: Multiaddr) -> Result Disconnecting => Connecting. @@ -2374,15 +2372,13 @@ mod tests { "/ip4/127.0.0.1/tcp/80".parse().unwrap(), TransportError::Other(io::Error::new( io::ErrorKind::Other, - Either::<_, Void>::Left(Either::::Right(UpgradeError::Apply( - MemoryTransportError::Unreachable, - ))), + MemoryTransportError::Unreachable, )), )]); let string = format!("{error}"); // Unfortunately, we have some "empty" errors that lead to multiple colons without text but that is the best we can do. - assert_eq!("Failed to negotiate transport protocol(s): [(/ip4/127.0.0.1/tcp/80: : Handshake failed: No listener on the given port.)]", string) + assert_eq!("Failed to negotiate transport protocol(s): [(/ip4/127.0.0.1/tcp/80: : No listener on the given port.)]", string) } }