From 8ad1d231165b7a035c50f8be8ffdfa1342e37425 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Mon, 16 Dec 2019 10:43:19 +0100 Subject: [PATCH] fix ci Signed-off-by: Yoshua Wuyts --- src/stream/double_ended_stream/mod.rs | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/stream/double_ended_stream/mod.rs b/src/stream/double_ended_stream/mod.rs index dc2a45c..a177865 100644 --- a/src/stream/double_ended_stream/mod.rs +++ b/src/stream/double_ended_stream/mod.rs @@ -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)