Skip to content

Commit

Permalink
Require S: async_std::stream::Stream in Scan
Browse files Browse the repository at this point in the history
  • Loading branch information
tirr-c committed Sep 16, 2019
1 parent d6ffdbc commit b70dfea
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/stream/stream/scan.rs
Original file line number Diff line number Diff line change
@@ -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<S, St, F> {
Expand All @@ -25,7 +26,7 @@ impl<S: Unpin, St, F> Unpin for Scan<S, St, F> {}

impl<S, St, F, B> futures_core::stream::Stream for Scan<S, St, F>
where
S: futures_core::stream::Stream,
S: Stream,
F: FnMut(&mut St, S::Item) -> Option<B>,
{
type Item = B;
Expand Down

0 comments on commit b70dfea

Please sign in to comment.