From a363d26553b2d48aff3a73773f9862d6e726ed47 Mon Sep 17 00:00:00 2001 From: Andrew Burkett Date: Sat, 18 Sep 2021 00:38:34 -0700 Subject: [PATCH] Fix Unusable Sink Implementation on scan (#2499) 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. --- futures-util/src/stream/stream/scan.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/futures-util/src/stream/stream/scan.rs b/futures-util/src/stream/stream/scan.rs index 8724145ef3..f5cfde9c36 100644 --- a/futures-util/src/stream/stream/scan.rs +++ b/futures-util/src/stream/stream/scan.rs @@ -118,11 +118,11 @@ where // Forwarding impl of Sink from the underlying stream #[cfg(feature = "sink")] -impl Sink for Scan +impl Sink for Scan where - S: Stream + Sink, + St: Stream + Sink, { - type Error = S::Error; + type Error = St::Error; delegate_sink!(stream, Item); }