diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-03-12 15:49:32 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-03-12 15:49:32 -0500 |
commit | eb3f6dbccfc2f1c87ec3c38c78abc3337ceb3ccb (patch) | |
tree | 7d8bb1120cb437874022af574451819f563afc0a /examples | |
parent | f069116b8c71775b3a6c83c247608eabc9b6fec1 (diff) | |
download | textmode-eb3f6dbccfc2f1c87ec3c38c78abc3337ceb3ccb.tar.gz textmode-eb3f6dbccfc2f1c87ec3c38c78abc3337ceb3ccb.zip |
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)
Diffstat (limited to 'examples')
-rw-r--r-- | examples/async.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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(); }); |