diff options
| author | Yuval Adam <_@yuv.al> | 2022-06-28 09:33:17 +0300 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2022-06-28 09:33:17 +0300 |
| commit | 7438c83aca7d5ba7eab7cafc3068207588c83ded (patch) | |
| tree | 56d9d1479bcc313716bbacef72b3f53c2b42c6af /src | |
| parent | f4f049df9f544e263eeb6e1f5bd3413eac0ae0c5 (diff) | |
Add rand call
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 0e1f7bc..e1e8efd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,20 @@ use futures::executor::block_on; +use rand::prelude::*; + +trait SimpleFuture { + type Output; + fn poll(&mut self, wake: fn()) -> Poll<Self::Output>; +} + +enum Poll<T> { + Ready(T), + Pending, +} async fn hello_world() { - println!("hello, world!"); + let mut rng = rand::thread_rng(); + let y: f64 = rng.gen(); + println!("hello, world! {}", y); } fn main() { |
