Skip to content

Commit

Permalink
Remove unnecessary Unpin bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
tirr-c committed Sep 15, 2019
1 parent 50a7db2 commit 91e61cf
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
Expand Up @@ -9,7 +9,7 @@ pub struct Scan<S, St, F> {
state_f: (St, F),
}

impl<S, St: Unpin, F: Unpin> Scan<S, St, F> {
impl<S, St, F> Scan<S, St, F> {
pub(crate) fn new(stream: S, initial_state: St, f: F) -> Self {
Self {
stream,
Expand All @@ -21,11 +21,12 @@ impl<S, St: Unpin, F: Unpin> Scan<S, St, F> {
pin_utils::unsafe_unpinned!(state_f: (St, F));
}

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,
St: Unpin,
F: Unpin + FnMut(&mut St, S::Item) -> Option<B>,
F: FnMut(&mut St, S::Item) -> Option<B>,
{
type Item = B;

Expand Down

0 comments on commit 91e61cf

Please sign in to comment.