mirror of
https://github.com/async-rs/async-std.git
synced 2025-01-19 20:13:51 +00:00
Fix next_back
This commit is contained in:
parent
ee2f52f3ce
commit
02aa2f3d2a
2 changed files with 4 additions and 4 deletions
|
@ -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…
Reference in a new issue