From a35602f375851fa82cdd0ffd73feea1ff06d4287 Mon Sep 17 00:00:00 2001 From: yjh Date: Tue, 5 Nov 2019 21:08:56 +0800 Subject: [PATCH] Update mod.rs --- src/stream/stream/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/stream/stream/mod.rs b/src/stream/stream/mod.rs index 01357b2..7112c38 100644 --- a/src/stream/stream/mod.rs +++ b/src/stream/stream/mod.rs @@ -387,10 +387,10 @@ extension_trait! { use async_std::prelude::*; use std::collections::VecDeque; - let v: VecDeque<_> = vec![&1, &2, &3].into_iter().collect(); - + let v = stream::from_iter(vec![&1, &2, &3]); + let mut v_cloned = v.cloned(); - + assert_eq!(v_cloned.next().await, Some(1)); assert_eq!(v_cloned.next().await, Some(2)); assert_eq!(v_cloned.next().await, Some(3));