diff --git a/core/src/transport.rs b/core/src/transport.rs index 2e39280b6aa..4b4ca825ec7 100644 --- a/core/src/transport.rs +++ b/core/src/transport.rs @@ -157,7 +157,7 @@ pub trait Transport { /// Boxes the transport, including custom transport errors. fn boxed(self) -> boxed::Boxed where - Self: Transport + Sized + Send + Sync + Unpin + 'static, + Self: Transport + Sized + Send + Unpin + 'static, Self::Dial: Send + 'static, Self::ListenerUpgrade: Send + 'static, Self::Error: Send + Sync, diff --git a/core/src/transport/boxed.rs b/core/src/transport/boxed.rs index 6ae4005972f..6e2ac4d27ee 100644 --- a/core/src/transport/boxed.rs +++ b/core/src/transport/boxed.rs @@ -31,7 +31,7 @@ use std::{ /// Creates a new [`Boxed`] transport from the given transport. pub fn boxed(transport: T) -> Boxed where - T: Transport + Send + Sync + Unpin + 'static, + T: Transport + Send + Unpin + 'static, T::Error: Send + Sync, T::Dial: Send + 'static, T::ListenerUpgrade: Send + 'static, @@ -45,7 +45,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 + Unpin>, + inner: Box + Send + Unpin>, } type Dial = Pin> + Send>>; diff --git a/core/src/transport/upgrade.rs b/core/src/transport/upgrade.rs index 689b584b631..338f8b92aed 100644 --- a/core/src/transport/upgrade.rs +++ b/core/src/transport/upgrade.rs @@ -295,7 +295,7 @@ impl Multiplexed { /// the [`StreamMuxer`] and custom transport errors. pub fn boxed(self) -> super::Boxed<(PeerId, StreamMuxerBox)> where - T: Transport + Sized + Send + Sync + Unpin + 'static, + T: Transport + Sized + Send + Unpin + 'static, T::Dial: Send + 'static, T::ListenerUpgrade: Send + 'static, T::Error: Send + Sync,