From b70dfeab15e134452d27c0d5c6ccb9a549f5c5a7 Mon Sep 17 00:00:00 2001 From: Wonwoo Choi Date: Mon, 16 Sep 2019 18:35:37 +0900 Subject: [PATCH] Require S: async_std::stream::Stream in Scan --- src/stream/stream/scan.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/stream/stream/scan.rs b/src/stream/stream/scan.rs index 4846144d8..222022b8f 100644 --- a/src/stream/stream/scan.rs +++ b/src/stream/stream/scan.rs @@ -1,7 +1,8 @@ -use crate::task::{Context, Poll}; - use std::pin::Pin; +use crate::stream::Stream; +use crate::task::{Context, Poll}; + /// A stream to maintain state while polling another stream. #[derive(Debug)] pub struct Scan { @@ -25,7 +26,7 @@ impl Unpin for Scan {} impl futures_core::stream::Stream for Scan where - S: futures_core::stream::Stream, + S: Stream, F: FnMut(&mut St, S::Item) -> Option, { type Item = B;