From 246ae0894d4074c38ea2d2eb520e386b0d36d82d Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 24 Feb 2022 02:42:25 -0500 Subject: move to tokio --- examples/input.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'examples/input.rs') diff --git a/examples/input.rs b/examples/input.rs index a3b1f1d..49a7c55 100644 --- a/examples/input.rs +++ b/examples/input.rs @@ -1,5 +1,6 @@ #[cfg(feature = "async")] -async fn async_main() { +#[tokio::main] +async fn main() { let mut input = textmode::Input::new().await.unwrap(); for arg in std::env::args().skip(1) { match arg.as_str() { @@ -27,11 +28,6 @@ async fn async_main() { } } -#[cfg(feature = "async")] -fn main() { - smol::block_on(async { async_main().await }) -} - #[cfg(not(feature = "async"))] fn main() { let mut input = textmode::blocking::Input::new().unwrap(); -- cgit v1.2.3-54-g00ecf