From 7438c83aca7d5ba7eab7cafc3068207588c83ded Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Tue, 28 Jun 2022 09:33:17 +0300 Subject: Add rand call --- src/main.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src') 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; +} + +enum Poll { + 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() { -- cgit v1.3.1