From 7b66471194490a1421001fd51d073cc6d18848ea Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 12 Feb 2022 13:25:39 -0500 Subject: clippy --- src/shell/history/pty.rs | 5 +++-- src/shell/mod.rs | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/shell/history/pty.rs b/src/shell/history/pty.rs index 0fe0942..5a51e73 100644 --- a/src/shell/history/pty.rs +++ b/src/shell/history/pty.rs @@ -70,9 +70,10 @@ async fn pty_task( event_w.send(Event::PtyOutput).await.unwrap(); } Err(e) => { - if e.raw_os_error() != Some(libc::EIO) { - panic!("pty read failed: {:?}", e); + if e.raw_os_error() == Some(libc::EIO) { + continue; } + panic!("pty read failed: {:?}", e); } }, Res::Write(res) => match res { diff --git a/src/shell/mod.rs b/src/shell/mod.rs index f7080a4..9c4002b 100644 --- a/src/shell/mod.rs +++ b/src/shell/mod.rs @@ -85,6 +85,8 @@ pub async fn main() -> anyhow::Result { async_std::channel::unbounded(); { let event_w = event_w.clone(); + // clippy can't tell that we assign to this later + #[allow(clippy::no_effect_underscore_binding)] let mut _active_watcher = None; async_std::task::spawn(async move { while let Ok(mut dir) = git_r.recv().await { -- cgit v1.2.3-54-g00ecf