Skip to content
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: 2 additions & 0 deletions core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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].
- Drop `Sync` requirement on `StreamMuxer` for constructing `StreamMuxerBox`. See [PR XXXX].

[PR 2724]: https://github.com/libp2p/rust-libp2p/pull/2724
[PR 2762]: https://github.com/libp2p/rust-libp2p/pull/2762
[PR XXXX]: https://github.com/libp2p/rust-libp2p/pull/XXXX
Comment thread
thomaseizinger marked this conversation as resolved.
Outdated

# 0.34.0

Expand Down
4 changes: 2 additions & 2 deletions core/src/muxing/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::task::{Context, Poll};

/// Abstract `StreamMuxer`.
pub struct StreamMuxerBox {
inner: Box<dyn StreamMuxer<Substream = SubstreamBox, Error = io::Error> + Send + Sync>,
inner: Box<dyn StreamMuxer<Substream = SubstreamBox, Error = io::Error> + Send>,
}

/// Abstract type for asynchronous reading and writing.
Expand Down Expand Up @@ -70,7 +70,7 @@ impl StreamMuxerBox {
/// Turns a stream muxer into a `StreamMuxerBox`.
pub fn new<T>(muxer: T) -> StreamMuxerBox
where
T: StreamMuxer + Send + Sync + 'static,
T: StreamMuxer + Send + 'static,
T::Substream: Send + Unpin + 'static,
T::Error: Send + Sync + 'static,
{
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 @@ -299,7 +299,7 @@ impl<T> Multiplexed<T> {
T::Dial: Send + 'static,
T::ListenerUpgrade: Send + 'static,
T::Error: Send + Sync,
M: StreamMuxer + Send + Sync + 'static,
M: StreamMuxer + Send + 'static,
M::Substream: Send + Unpin + 'static,
M::Error: Send + Sync + 'static,
Comment on lines 301 to 304

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also drop the other Sync requirements here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe. I'd say we do it in a different PR though :)

{
Expand Down