From 02aa2f3d2a918d5e50944d8b9c6b2e5620e78bc1 Mon Sep 17 00:00:00 2001 From: Felipe Sere Date: Wed, 20 Nov 2019 21:48:04 +0000 Subject: [PATCH] Fix next_back --- src/stream/double_ended/mod.rs | 6 +++--- src/stream/double_ended/nth_back.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/stream/double_ended/mod.rs b/src/stream/double_ended/mod.rs index a3dbafd6..ec9e6ae6 100644 --- a/src/stream/double_ended/mod.rs +++ b/src/stream/double_ended/mod.rs @@ -49,13 +49,13 @@ extension_trait! { let mut s = Sample::from(vec![7u8]); - assert_eq!(s.next().await, Some(7)); - assert_eq!(s.next().await, None); + assert_eq!(s.next_back().await, Some(7)); + assert_eq!(s.next_back().await, None); # # }) } ``` "#] - fn next(&mut self) -> impl Future> + '_ [NextBackFuture<'_, Self>] + fn next_back(&mut self) -> impl Future> + '_ [NextBackFuture<'_, Self>] where Self: Unpin, { diff --git a/src/stream/double_ended/nth_back.rs b/src/stream/double_ended/nth_back.rs index e318e79a..8e1ed637 100644 --- a/src/stream/double_ended/nth_back.rs +++ b/src/stream/double_ended/nth_back.rs @@ -1,6 +1,6 @@ +use std::future::Future; use std::pin::Pin; use std::task::{Context, Poll}; -use std::future::Future; use crate::stream::DoubleEndedStream;