Skip to content

Commit b70dfea

Browse files
committed
Require S: async_std::stream::Stream in Scan
1 parent d6ffdbc commit b70dfea

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/stream/stream/scan.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
use crate::task::{Context, Poll};
2-
31
use std::pin::Pin;
42

3+
use crate::stream::Stream;
4+
use crate::task::{Context, Poll};
5+
56
/// A stream to maintain state while polling another stream.
67
#[derive(Debug)]
78
pub struct Scan<S, St, F> {
@@ -25,7 +26,7 @@ impl<S: Unpin, St, F> Unpin for Scan<S, St, F> {}
2526

2627
impl<S, St, F, B> futures_core::stream::Stream for Scan<S, St, F>
2728
where
28-
S: futures_core::stream::Stream,
29+
S: Stream,
2930
F: FnMut(&mut St, S::Item) -> Option<B>,
3031
{
3132
type Item = B;

0 commit comments

Comments
 (0)