summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-11-17 22:35:24 -0500
committerJesse Luehrs <doy@tozt.net>2021-11-17 22:35:24 -0500
commit4025a5fa46ec24902ee1fb2d6764aed872a3d5b7 (patch)
tree24b3be76f7af241bfb7205d3c1a05f05e5b923df /src/main.rs
parent2597e1954659608c94965015651e3eac1f12a206 (diff)
downloadnbsh-4025a5fa46ec24902ee1fb2d6764aed872a3d5b7.tar.gz
nbsh-4025a5fa46ec24902ee1fb2d6764aed872a3d5b7.zip
simplify
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 73a05ee..3953bd5 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -62,8 +62,9 @@ async fn async_main() -> anyhow::Result<()> {
let action_w = action_w.clone();
async_std::task::spawn(async move {
while let Some(key) = input.read_key().await.unwrap() {
- let action = state.lock_arc().await.handle_key(key).await;
- if let Some(action) = action {
+ if let Some(action) =
+ state.lock_arc().await.handle_key(key).await
+ {
action_w.send(action).await.unwrap();
}
}