aboutsummaryrefslogtreecommitdiffstats
path: root/examples/async.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-03-07 18:38:22 -0500
committerJesse Luehrs <doy@tozt.net>2021-03-07 18:38:22 -0500
commitae4f5469711705e2686fd2be65e4fbc700f93e12 (patch)
tree2d525a7544e6ddfcd4851aedbfa219ad85e965e4 /examples/async.rs
parent4a3d1dd61bd2e32b26206f035406fd655d040087 (diff)
downloadtextmode-ae4f5469711705e2686fd2be65e4fbc700f93e12.tar.gz
textmode-ae4f5469711705e2686fd2be65e4fbc700f93e12.zip
separate out the guards from the main structs
Diffstat (limited to 'examples/async.rs')
-rw-r--r--examples/async.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/async.rs b/examples/async.rs
index 3736cb8..b97ad24 100644
--- a/examples/async.rs
+++ b/examples/async.rs
@@ -21,9 +21,9 @@ async fn run(tm: &mut textmode::r#async::Output) -> std::io::Result<()> {
fn main() {
smol::block_on(async {
- let mut tm = textmode::r#async::Output::new().await.unwrap();
+ let (mut tm, _guard) =
+ textmode::r#async::Output::new().await.unwrap();
let e = run(&mut tm).await;
- tm.cleanup().await.unwrap();
e.unwrap();
});
}