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/tmux.rs | |
parent | cd617e021bed862ac3794cc71123959c8d7d7dd1 (diff) | |
download | textmode-246ae0894d4074c38ea2d2eb520e386b0d36d82d.tar.gz textmode-246ae0894d4074c38ea2d2eb520e386b0d36d82d.zip |
move to tokio
Diffstat (limited to 'examples/tmux.rs')
-rw-r--r-- | examples/tmux.rs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/examples/tmux.rs b/examples/tmux.rs index 5eebee4..46a4926 100644 --- a/examples/tmux.rs +++ b/examples/tmux.rs @@ -2,15 +2,10 @@ mod tmux_impl; #[cfg(feature = "async")] -async fn async_main(ex: &smol::Executor<'_>) { +#[tokio::main] +async fn main() { let tmux = tmux_impl::Tmux::new().await; - tmux.run(ex).await; -} - -#[cfg(feature = "async")] -fn main() { - let ex = smol::Executor::new(); - smol::block_on(async { async_main(&ex).await }) + tmux.run().await; } #[cfg(not(feature = "async"))] |