summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2022-06-28 09:33:17 +0300
committerYuval Adam <_@yuv.al>2022-06-28 09:33:17 +0300
commit7438c83aca7d5ba7eab7cafc3068207588c83ded (patch)
tree56d9d1479bcc313716bbacef72b3f53c2b42c6af /src
parentf4f049df9f544e263eeb6e1f5bd3413eac0ae0c5 (diff)
Add rand call
Diffstat (limited to 'src')
-rw-r--r--src/main.rs15
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() {