diff options
author | Jesse Luehrs <doy@tozt.net> | 2022-02-24 02:42:25 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2022-02-24 02:50:33 -0500 |
commit | 246ae0894d4074c38ea2d2eb520e386b0d36d82d (patch) | |
tree | d2e681e4df655a63519193d0b797b09d0afdd4cc /examples/input.rs | |
parent | cd617e021bed862ac3794cc71123959c8d7d7dd1 (diff) | |
download | textmode-246ae0894d4074c38ea2d2eb520e386b0d36d82d.tar.gz textmode-246ae0894d4074c38ea2d2eb520e386b0d36d82d.zip |
move to tokio
Diffstat (limited to 'examples/input.rs')
-rw-r--r-- | examples/input.rs | 8 |
1 files changed, 2 insertions, 6 deletions
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(); |