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/tmux.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'examples/tmux.rs') 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"))] -- cgit v1.2.3-54-g00ecf