Skip to content

Commit d7f5019

Browse files
thomaseizingerelenaf9
authored andcommitted
Remove various Sync bounds
With `Transport` becoming non-Clone and having `&mut` self receivers, the `Sync` requirement no longer makes any sense and we can thus remove it.
1 parent 607412d commit d7f5019

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

core/src/transport.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ pub trait Transport {
157157
/// Boxes the transport, including custom transport errors.
158158
fn boxed(self) -> boxed::Boxed<Self::Output>
159159
where
160-
Self: Transport + Sized + Send + Sync + Unpin + 'static,
160+
Self: Transport + Sized + Send + Unpin + 'static,
161161
Self::Dial: Send + 'static,
162162
Self::ListenerUpgrade: Send + 'static,
163163
Self::Error: Send + Sync,

core/src/transport/boxed.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use std::{
3131
/// Creates a new [`Boxed`] transport from the given transport.
3232
pub fn boxed<T>(transport: T) -> Boxed<T::Output>
3333
where
34-
T: Transport + Send + Sync + Unpin + 'static,
34+
T: Transport + Send + Unpin + 'static,
3535
T::Error: Send + Sync,
3636
T::Dial: Send + 'static,
3737
T::ListenerUpgrade: Send + 'static,
@@ -45,7 +45,7 @@ where
4545
/// and `ListenerUpgrade` futures are `Box`ed and only the `Output`
4646
/// and `Error` types are captured in type variables.
4747
pub struct Boxed<O> {
48-
inner: Box<dyn Abstract<O> + Send + Sync + Unpin>,
48+
inner: Box<dyn Abstract<O> + Send + Unpin>,
4949
}
5050

5151
type Dial<O> = Pin<Box<dyn Future<Output = io::Result<O>> + Send>>;

core/src/transport/upgrade.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ impl<T> Multiplexed<T> {
295295
/// the [`StreamMuxer`] and custom transport errors.
296296
pub fn boxed<M>(self) -> super::Boxed<(PeerId, StreamMuxerBox)>
297297
where
298-
T: Transport<Output = (PeerId, M)> + Sized + Send + Sync + Unpin + 'static,
298+
T: Transport<Output = (PeerId, M)> + Sized + Send + Unpin + 'static,
299299
T::Dial: Send + 'static,
300300
T::ListenerUpgrade: Send + 'static,
301301
T::Error: Send + Sync,

0 commit comments

Comments
 (0)