blob: 5eebee4679b2662a30eef323c2f27a39c26f0d80 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#[cfg(feature = "async")]
mod tmux_impl;
#[cfg(feature = "async")]
async fn async_main(ex: &smol::Executor<'_>) {
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 })
}
#[cfg(not(feature = "async"))]
fn main() {
panic!("tmux example requires feature async")
}
|