async-tcp & future-hello: use better futures functions

This commit is contained in:
2019-01-25 18:09:59 +01:00
parent b439b235f8
commit 5b59369043
2 changed files with 11 additions and 2 deletions

View File

@@ -37,4 +37,6 @@ where
fn main() {
let future = Display(HelloWorld);
tokio::run(future);
let better_future = HelloWorld.map(|value| println!("{}", value));
tokio::run(better_future);
}