Merge pull request #630 from async-rs/fix-ci-2

fix ci
split-by-pattern
Yoshua Wuyts 5 years ago committed by GitHub
commit 6f4dcad6a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -105,9 +105,10 @@ pub trait DoubleEndedStream: Stream {
```
# fn main() { async_std::task::block_on(async {
#
use async_std::stream::double_ended_stream::{self, DoubleEndedStream};
use async_std::prelude::*;
use async_std::stream;
let mut s = double_ended_stream::from_iter(vec![7u8]);
let mut s = stream::from_iter(vec![7u8]);
assert_eq!(s.next_back().await, Some(7));
assert_eq!(s.next_back().await, None);
@ -132,9 +133,10 @@ pub trait DoubleEndedStream: Stream {
```
# fn main() { async_std::task::block_on(async {
#
use async_std::stream::double_ended_stream::{self, DoubleEndedStream};
use async_std::prelude::*;
use async_std::stream;
let mut s = double_ended_stream::from_iter(vec![1u8, 2, 3, 4, 5]);
let mut s = stream::from_iter(vec![1u8, 2, 3, 4, 5]);
let second = s.nth_back(1).await;
assert_eq!(second, Some(4));
@ -159,9 +161,10 @@ pub trait DoubleEndedStream: Stream {
```
# fn main() { async_std::task::block_on(async {
#
use async_std::stream::double_ended_stream::{self, DoubleEndedStream};
use async_std::prelude::*;
use async_std::stream;
let mut s = double_ended_stream::from_iter(vec![1u8, 2, 3, 4, 5]);
let mut s = stream::from_iter(vec![1u8, 2, 3, 4, 5]);
let second = s.rfind(|v| v % 2 == 0).await;
assert_eq!(second, Some(4));
@ -185,9 +188,10 @@ pub trait DoubleEndedStream: Stream {
```
# fn main() { async_std::task::block_on(async {
#
use async_std::stream::double_ended_stream::{self, DoubleEndedStream};
use async_std::prelude::*;
use async_std::stream;
let s = double_ended_stream::from_iter(vec![1u8, 2, 3, 4, 5]);
let s = stream::from_iter(vec![1u8, 2, 3, 4, 5]);
let second = s.rfold(0, |acc, v| v + acc).await;
@ -215,9 +219,10 @@ pub trait DoubleEndedStream: Stream {
```
# fn main() { async_std::task::block_on(async {
#
use async_std::stream::double_ended_stream::{self, DoubleEndedStream};
use async_std::prelude::*;
use async_std::stream;
let s = double_ended_stream::from_iter(vec![1u8, 2, 3, 4, 5]);
let s = stream::from_iter(vec![1u8, 2, 3, 4, 5]);
let sum = s.try_rfold(0, |acc, v| {
if (acc+v) % 2 == 1 {
Ok(v+3)

@ -587,13 +587,13 @@ extension_trait! {
assert_eq!(s.next().await, Some(1));
// There will be no delay after the first time.
assert!(start.elapsed().as_millis() <= 210);
assert!(start.elapsed().as_millis() < 400);
assert_eq!(s.next().await, Some(2));
assert!(start.elapsed().as_millis() <= 210);
assert!(start.elapsed().as_millis() < 400);
assert_eq!(s.next().await, None);
assert!(start.elapsed().as_millis() <= 210);
assert!(start.elapsed().as_millis() < 400);
#
# }) }
```

Loading…
Cancel
Save