core/muxing: Remove Unpin requirement from StreamMuxer::Substream (#2776)

This commit is contained in:
Thomas Eizinger
2022-07-25 15:49:22 +01:00
committed by GitHub
parent c19a211dfd
commit 0ec3bbccb2
3 changed files with 5 additions and 4 deletions

View File

@ -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;
@ -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 };

View File

@ -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))))