summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2022-06-28 09:23:31 +0300
committerYuval Adam <_@yuv.al>2022-06-28 09:23:31 +0300
commit1764cc87d6ce54b00937786d0528def7919cede0 (patch)
tree6c15ad762fc13f6d063b5b8d373552637fa7b4dc /src/main.rs
parent9860bd2809114dc2fb9c0426b2cb4147bcecd50c (diff)
Stupid simple future executor
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index e7a11a9..0e1f7bc 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,3 +1,10 @@
+use futures::executor::block_on;
+
+async fn hello_world() {
+ println!("hello, world!");
+}
+
fn main() {
- println!("Hello, world!");
+ let future = hello_world();
+ block_on(future);
}