diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index 0fb742af96a..047a7ac40e2 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -3,9 +3,11 @@ - Remove `StreamMuxer::poll_event` in favor of individual functions: `poll_inbound`, `poll_outbound` and `poll_address_change`. Consequently, `StreamMuxerEvent` is also removed. See [PR 2724]. - Drop `Unpin` requirement from `SubstreamBox`. See [PR 2762] and [PR 2776]. +- Drop `Sync` requirement on `StreamMuxer` for constructing `StreamMuxerBox`. See [PR 2775]. [PR 2724]: https://github.com/libp2p/rust-libp2p/pull/2724 [PR 2762]: https://github.com/libp2p/rust-libp2p/pull/2762 +[PR 2775]: https://github.com/libp2p/rust-libp2p/pull/2775 [PR 2776]: https://github.com/libp2p/rust-libp2p/pull/2776 # 0.34.0 diff --git a/core/src/muxing/boxed.rs b/core/src/muxing/boxed.rs index 5dc98835866..8c6467dd7ad 100644 --- a/core/src/muxing/boxed.rs +++ b/core/src/muxing/boxed.rs @@ -10,7 +10,7 @@ use std::task::{Context, Poll}; /// Abstract `StreamMuxer`. pub struct StreamMuxerBox { - inner: Box + Send + Sync>, + inner: Box + Send>, } /// Abstract type for asynchronous reading and writing. @@ -70,7 +70,7 @@ impl StreamMuxerBox { /// Turns a stream muxer into a `StreamMuxerBox`. pub fn new(muxer: T) -> StreamMuxerBox where - T: StreamMuxer + Send + Sync + 'static, + T: StreamMuxer + Send + 'static, T::Substream: Send + 'static, T::Error: Send + Sync + 'static, { diff --git a/core/src/transport/upgrade.rs b/core/src/transport/upgrade.rs index eb7b310c0a9..8fc0454794f 100644 --- a/core/src/transport/upgrade.rs +++ b/core/src/transport/upgrade.rs @@ -299,7 +299,7 @@ impl Multiplexed { T::Dial: Send + 'static, T::ListenerUpgrade: Send + 'static, T::Error: Send + Sync, - M: StreamMuxer + Send + Sync + 'static, + M: StreamMuxer + Send + 'static, M::Substream: Send + 'static, M::Error: Send + Sync + 'static, {