diff --git a/core/src/muxing.rs b/core/src/muxing.rs index 06534e7a8346..847a193b8322 100644 --- a/core/src/muxing.rs +++ b/core/src/muxing.rs @@ -138,7 +138,7 @@ impl StreamMuxerEvent { /// Map the stream within [`StreamMuxerEvent::InboundSubstream`] and /// [`StreamMuxerEvent::OutboundSubstream`] to a new type. - pub fn map_stream(self, map: impl FnOnce(O) -> O) -> StreamMuxerEvent { + pub fn map_stream(self, map: impl FnOnce(T) -> O) -> StreamMuxerEvent { match self { StreamMuxerEvent::InboundSubstream(stream) => { StreamMuxerEvent::InboundSubstream(map(stream))