mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-30 02:01:35 +00:00
core/muxing: Remove Unpin
requirement from StreamMuxer::Substream
(#2776)
This commit is contained in:
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
- Remove `StreamMuxer::poll_event` in favor of individual functions: `poll_inbound`, `poll_outbound`
|
- 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].
|
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 2724]: https://github.com/libp2p/rust-libp2p/pull/2724
|
||||||
[PR 2762]: https://github.com/libp2p/rust-libp2p/pull/2762
|
[PR 2762]: https://github.com/libp2p/rust-libp2p/pull/2762
|
||||||
|
[PR 2776]: https://github.com/libp2p/rust-libp2p/pull/2776
|
||||||
|
|
||||||
# 0.34.0
|
# 0.34.0
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ where
|
|||||||
impl<T> StreamMuxer for Wrap<T>
|
impl<T> StreamMuxer for Wrap<T>
|
||||||
where
|
where
|
||||||
T: StreamMuxer,
|
T: StreamMuxer,
|
||||||
T::Substream: Send + Unpin + 'static,
|
T::Substream: Send + 'static,
|
||||||
T::Error: Send + Sync + 'static,
|
T::Error: Send + Sync + 'static,
|
||||||
{
|
{
|
||||||
type Substream = SubstreamBox;
|
type Substream = SubstreamBox;
|
||||||
@ -71,7 +71,7 @@ impl StreamMuxerBox {
|
|||||||
pub fn new<T>(muxer: T) -> StreamMuxerBox
|
pub fn new<T>(muxer: T) -> StreamMuxerBox
|
||||||
where
|
where
|
||||||
T: StreamMuxer + Send + Sync + 'static,
|
T: StreamMuxer + Send + Sync + 'static,
|
||||||
T::Substream: Send + Unpin + 'static,
|
T::Substream: Send + 'static,
|
||||||
T::Error: Send + Sync + 'static,
|
T::Error: Send + Sync + 'static,
|
||||||
{
|
{
|
||||||
let wrap = Wrap { inner: muxer };
|
let wrap = Wrap { inner: muxer };
|
||||||
|
@ -300,7 +300,7 @@ impl<T> Multiplexed<T> {
|
|||||||
T::ListenerUpgrade: Send + 'static,
|
T::ListenerUpgrade: Send + 'static,
|
||||||
T::Error: Send + Sync,
|
T::Error: Send + Sync,
|
||||||
M: StreamMuxer + Send + Sync + 'static,
|
M: StreamMuxer + Send + Sync + 'static,
|
||||||
M::Substream: Send + Unpin + 'static,
|
M::Substream: Send + 'static,
|
||||||
M::Error: Send + Sync + 'static,
|
M::Error: Send + Sync + 'static,
|
||||||
{
|
{
|
||||||
boxed(self.map(|(i, m), _| (i, StreamMuxerBox::new(m))))
|
boxed(self.map(|(i, m), _| (i, StreamMuxerBox::new(m))))
|
||||||
|
Reference in New Issue
Block a user