Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core/transport: Remove various Sync bounds #2667

Merged
merged 3 commits into from
May 29, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ pub trait Transport {
/// Boxes the transport, including custom transport errors.
fn boxed(self) -> boxed::Boxed<Self::Output>
where
Self: Transport + Sized + Send + Sync + 'static,
Self: Transport + Sized + Send + 'static,
Self::Dial: Send + 'static,
Self::Listener: Send + 'static,
Self::ListenerUpgrade: Send + 'static,
Expand Down
4 changes: 2 additions & 2 deletions core/src/transport/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use std::{error::Error, fmt, io, pin::Pin};
/// Creates a new [`Boxed`] transport from the given transport.
pub fn boxed<T>(transport: T) -> Boxed<T::Output>
where
T: Transport + Send + Sync + 'static,
T: Transport + Send + 'static,
T::Error: Send + Sync,
T::Dial: Send + 'static,
T::Listener: Send + 'static,
Expand All @@ -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<O> {
inner: Box<dyn Abstract<O> + Send + Sync>,
inner: Box<dyn Abstract<O> + Send>,
}

type Dial<O> = Pin<Box<dyn Future<Output = io::Result<O>> + Send>>;
Expand Down
2 changes: 1 addition & 1 deletion core/src/transport/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ impl<T> Multiplexed<T> {
/// the [`StreamMuxer`] and custom transport errors.
pub fn boxed<M>(self) -> super::Boxed<(PeerId, StreamMuxerBox)>
where
T: Transport<Output = (PeerId, M)> + Sized + Send + Sync + 'static,
T: Transport<Output = (PeerId, M)> + Sized + Send + 'static,
T::Dial: Send + 'static,
T::Listener: Send + 'static,
T::ListenerUpgrade: Send + 'static,
Expand Down