Fix Unusable Sink Implementation on scan
The current Sink implementation on stream::Scan requires the stream and
state types are the same which doesn't practically allow that
implementation to be used. This adds a separate generic to the Sink
implementation for state.
@@ -115,11 +115,11 @@ where
// Forwarding impl of Sink from the underlying stream
#[cfg(feature = "sink")]
-impl<S, Fut, F, Item> Sink<Item> for Scan<S, S, Fut, F>
+impl<St, S, Fut, F, Item> Sink<Item> for Scan<St, S, Fut, F>
where
- S: Stream + Sink<Item>,
+ St: Stream + Sink<Item>,
{
- type Error = S::Error;
+ type Error = St::Error;
delegate_sink!(stream, Item);
}
