diff --git a/core/src/transport.rs b/core/src/transport.rs index ce64f2dd923..a625e3b552c 100644 --- a/core/src/transport.rs +++ b/core/src/transport.rs @@ -152,7 +152,7 @@ pub trait Transport { /// Boxes the transport, including custom transport errors. fn boxed(self) -> boxed::Boxed where - Self: Transport + Sized + Send + Sync + 'static, + Self: Transport + Sized + Send + 'static, Self::Dial: Send + 'static, Self::Listener: Send + 'static, Self::ListenerUpgrade: Send + 'static, diff --git a/core/src/transport/boxed.rs b/core/src/transport/boxed.rs index 6ddf34ad950..8a804aa40be 100644 --- a/core/src/transport/boxed.rs +++ b/core/src/transport/boxed.rs @@ -26,7 +26,7 @@ use std::{error::Error, fmt, io, pin::Pin}; /// Creates a new [`Boxed`] transport from the given transport. pub fn boxed(transport: T) -> Boxed where - T: Transport + Send + Sync + 'static, + T: Transport + Send + 'static, T::Error: Send + Sync, T::Dial: Send + 'static, T::Listener: Send + 'static, @@ -41,7 +41,7 @@ where /// and `ListenerUpgrade` futures are `Box`ed and only the `Output` /// and `Error` types are captured in type variables. pub struct Boxed { - inner: Box + Send + Sync>, + inner: Box + Send>, } type Dial = Pin> + Send>>; diff --git a/core/src/transport/upgrade.rs b/core/src/transport/upgrade.rs index c72859eb57d..5508429754f 100644 --- a/core/src/transport/upgrade.rs +++ b/core/src/transport/upgrade.rs @@ -294,7 +294,7 @@ impl Multiplexed { /// the [`StreamMuxer`] and custom transport errors. pub fn boxed(self) -> super::Boxed<(PeerId, StreamMuxerBox)> where - T: Transport + Sized + Send + Sync + 'static, + T: Transport + Sized + Send + 'static, T::Dial: Send + 'static, T::Listener: Send + 'static, T::ListenerUpgrade: Send + 'static,