Fix next_back

pull/562/head
Felipe Sere 5 years ago
parent ee2f52f3ce
commit 02aa2f3d2a

@ -49,13 +49,13 @@ extension_trait! {
let mut s = Sample::from(vec![7u8]); let mut s = Sample::from(vec![7u8]);
assert_eq!(s.next().await, Some(7)); assert_eq!(s.next_back().await, Some(7));
assert_eq!(s.next().await, None); assert_eq!(s.next_back().await, None);
# #
# }) } # }) }
``` ```
"#] "#]
fn next(&mut self) -> impl Future<Output = Option<Self::Item>> + '_ [NextBackFuture<'_, Self>] fn next_back(&mut self) -> impl Future<Output = Option<Self::Item>> + '_ [NextBackFuture<'_, Self>]
where where
Self: Unpin, Self: Unpin,
{ {

@ -1,6 +1,6 @@
use std::future::Future;
use std::pin::Pin; use std::pin::Pin;
use std::task::{Context, Poll}; use std::task::{Context, Poll};
use std::future::Future;
use crate::stream::DoubleEndedStream; use crate::stream::DoubleEndedStream;

Loading…
Cancel
Save