From eb3f6dbccfc2f1c87ec3c38c78abc3337ceb3ccb Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 12 Mar 2021 15:49:32 -0500 Subject: initialize input before output in example this way we're sure that raw mode is enabled before data is sent (so programs that are waiting for input won't accidentally send data too early) --- examples/async.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/async.rs b/examples/async.rs index e8c88ba..52c1edb 100644 --- a/examples/async.rs +++ b/examples/async.rs @@ -24,8 +24,8 @@ async fn run( fn main() { smol::block_on(async { - let mut tm = textmode::Output::new().await.unwrap(); let mut input = textmode::Input::new().await.unwrap(); + let mut tm = textmode::Output::new().await.unwrap(); let e = run(&mut tm, &mut input).await; e.unwrap(); }); -- cgit v1.2.3-54-g00ecf