aboutsummaryrefslogtreecommitdiffstats
path: root/examples/input.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/input.rs')
-rw-r--r--examples/input.rs8
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();