diff options
Diffstat (limited to 'src/main.rs')
| -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() { |
