From ed1cb49807d119f85e28631f3aef74b6c162bdb5 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Mon, 4 Nov 2019 01:50:11 +0100 Subject: [PATCH] remove remaining instances of VecDeque stream Signed-off-by: Yoshua Wuyts --- src/option/product.rs | 4 ++-- src/stream/stream/mod.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/option/product.rs b/src/option/product.rs index 8b66bc6..9b7274f 100644 --- a/src/option/product.rs +++ b/src/option/product.rs @@ -20,10 +20,10 @@ where ``` # fn main() { async_std::task::block_on(async { # - use std::collections::VecDeque; use async_std::prelude::*; + use async_std::stream; - let v: VecDeque<_> = vec![1, 2, 4].into_iter().collect(); + let v = stream::from_iter(vec![1, 2, 4]); let prod: Option = v.map(|x| if x < 0 { None diff --git a/src/stream/stream/mod.rs b/src/stream/stream/mod.rs index 923c52b..4ab12a1 100644 --- a/src/stream/stream/mod.rs +++ b/src/stream/stream/mod.rs @@ -2012,10 +2012,10 @@ extension_trait! { # fn main() { async_std::task::block_on(async { # async fn factorial(n: u32) -> u32 { - use std::collections::VecDeque; use async_std::prelude::*; + use async_std::stream; - let s: VecDeque<_> = (1..=n).collect(); + let s = stream::from_iter(1..=n); s.product().await }