From 91e61cf6bf6808b8f9380122a0d38b4d79b1fdd1 Mon Sep 17 00:00:00 2001 From: Wonwoo Choi Date: Sun, 15 Sep 2019 21:18:02 +0900 Subject: [PATCH] Remove unnecessary Unpin bounds --- 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 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;