mirror of
https://github.com/async-rs/async-std.git
synced 2025-01-31 01:35:33 +00:00
Merge pull request #449 from async-rs/strip-vecdeque
remove remaining instances of VecDeque stream
This commit is contained in:
commit
282ae064fe
2 changed files with 4 additions and 4 deletions
|
@ -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<i32> = v.map(|x|
|
||||
if x < 0 {
|
||||
None
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue