From bfb96e24758bc9669f4f78d325d80c11c9bef52d Mon Sep 17 00:00:00 2001 From: _ <> Date: Sun, 10 Oct 2021 19:39:50 +0000 Subject: [PATCH] :rotating_light: clippy warnings --- prototypes/ptth_quic_client_gui/src/main.rs | 8 ++++---- prototypes/quic_demo/src/client_proxy.rs | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/prototypes/ptth_quic_client_gui/src/main.rs b/prototypes/ptth_quic_client_gui/src/main.rs index b8c265a..6fe0348 100644 --- a/prototypes/ptth_quic_client_gui/src/main.rs +++ b/prototypes/ptth_quic_client_gui/src/main.rs @@ -195,10 +195,10 @@ fn main () -> anyhow::Result <()> { while app.wait () { match fltk_rx.recv () { Some (Message::OpenPort (port_idx)) => { - match gui_client.open_port (connection_p2_p3.clone (), port_idx) { - Err (e) => error! ("{:?}", e), - _ => (), - }; + if let Err (e) = gui_client.open_port (connection_p2_p3.clone (), port_idx) + { + error! ("{:?}", e); + } }, Some (Message::ClosePort (port_idx)) => { gui_client.close_port (port_idx)?; diff --git a/prototypes/quic_demo/src/client_proxy.rs b/prototypes/quic_demo/src/client_proxy.rs index d7d39ca..93f9d49 100644 --- a/prototypes/quic_demo/src/client_proxy.rs +++ b/prototypes/quic_demo/src/client_proxy.rs @@ -36,9 +36,8 @@ impl ForwardingInstance { } pub async fn close (self) -> anyhow::Result <()> { - match self.shutdown_flag.send (false) { - Err (_) => warn! ("Trying to gracefully shutdown forwarding task but it appears to already be shut down"), - _ => (), + if self.shutdown_flag.send (false).is_err () { + warn! ("Trying to gracefully shutdown forwarding task but it appears to already be shut down"); } self.task.await .context ("awaiting ForwardingInstance task")?