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