diff --git a/src/stream/stream/scan.rs b/src/stream/stream/scan.rs index 0776a7b..4846144 100644 --- a/src/stream/stream/scan.rs +++ b/src/stream/stream/scan.rs @@ -9,7 +9,7 @@ pub struct Scan { state_f: (St, F), } -impl Scan { +impl Scan { pub(crate) fn new(stream: S, initial_state: St, f: F) -> Self { Self { stream, @@ -21,11 +21,12 @@ impl Scan { pin_utils::unsafe_unpinned!(state_f: (St, F)); } +impl Unpin for Scan {} + impl futures_core::stream::Stream for Scan where S: futures_core::stream::Stream, - St: Unpin, - F: Unpin + FnMut(&mut St, S::Item) -> Option, + F: FnMut(&mut St, S::Item) -> Option, { type Item = B;