From e8246730cbd6b85a7a8186a65cd3232273013453 Mon Sep 17 00:00:00 2001 From: Andrew Burkett Date: Fri, 17 Sep 2021 14:43:48 -0700 Subject: [PATCH] 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. --- 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 c6ea456b33..c5cf035c55 100644 --- a/futures-util/src/stream/stream/scan.rs +++ b/futures-util/src/stream/stream/scan.rs @@ -115,11 +115,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); }