This commit is contained in:
notplants 2022-01-04 14:59:28 -05:00
parent 2fd4c12a95
commit c4b57ae813
1 changed files with 1 additions and 23 deletions

View File

@ -188,26 +188,4 @@ pub async fn print_source_until_eof<'a, R, T, F>(
}
}
Ok(())
}
pub async fn get_async_num() -> i32 {
let millis = Uniform::from(0..10).sample(&mut rand::thread_rng());
println!("get_async_num will complete in {} ms", millis);
task::sleep(Duration::from_millis(millis)).await;
let i: i32 = rand::random();
i
}
// pub fn get_source_stream() -> impl Stream<Item = i32> {
// let s = stream! {
// for i in 0..3 {
// let x = get_async_num().await;
// yield x;
// }
// };
// s
// }
}