Skip to content

Commit

Permalink
core/muxing: Remove Unpin requirement from StreamMuxer::Substream (
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaseizinger committed Jul 25, 2022
1 parent c19a211 commit 0ec3bbc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion core/CHANGELOG.md
Expand Up @@ -2,10 +2,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].
- Drop `Unpin` requirement from `SubstreamBox`. See [PR 2762] and [PR 2776].

[PR 2724]: https://github.com/libp2p/rust-libp2p/pull/2724
[PR 2762]: https://github.com/libp2p/rust-libp2p/pull/2762
[PR 2776]: https://github.com/libp2p/rust-libp2p/pull/2776

# 0.34.0

Expand Down
4 changes: 2 additions & 2 deletions core/src/muxing/boxed.rs
Expand Up @@ -29,7 +29,7 @@ where
impl<T> StreamMuxer for Wrap<T>
where
T: StreamMuxer,
T::Substream: Send + Unpin + 'static,
T::Substream: Send + 'static,
T::Error: Send + Sync + 'static,
{
type Substream = SubstreamBox;
Expand Down Expand Up @@ -71,7 +71,7 @@ impl StreamMuxerBox {
pub fn new<T>(muxer: T) -> StreamMuxerBox
where
T: StreamMuxer + Send + Sync + 'static,
T::Substream: Send + Unpin + 'static,
T::Substream: Send + 'static,
T::Error: Send + Sync + 'static,
{
let wrap = Wrap { inner: muxer };
Expand Down
2 changes: 1 addition & 1 deletion core/src/transport/upgrade.rs
Expand Up @@ -300,7 +300,7 @@ impl<T> Multiplexed<T> {
T::ListenerUpgrade: Send + 'static,
T::Error: Send + Sync,
M: StreamMuxer + Send + Sync + 'static,
M::Substream: Send + Unpin + 'static,
M::Substream: Send + 'static,
M::Error: Send + Sync + 'static,
{
boxed(self.map(|(i, m), _| (i, StreamMuxerBox::new(m))))
Expand Down

0 comments on commit 0ec3bbc

Please sign in to comment.