From 9b35283ca6d1de353186daff625c421dee88f88f Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Thu, 8 Sep 2022 20:07:11 +0300 Subject: [PATCH] =?UTF-8?q?refactor(clippy):=20=F0=9F=93=A6=20Fix=20clippy?= =?UTF-8?q?=20error=20with=20matches!()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/chainofcommand/src/main.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/bin/chainofcommand/src/main.rs b/bin/chainofcommand/src/main.rs index 89bdea5..0bebe87 100644 --- a/bin/chainofcommand/src/main.rs +++ b/bin/chainofcommand/src/main.rs @@ -416,15 +416,9 @@ async fn main() -> Result<()> { execute!(stdout, style::Print(format!("\nError: {:?}\n", e)))?; stdout.flush()?; - let cont = match e.downcast_ref::() { - Some(e) - if e.kind() == std::io::ErrorKind::NotFound - || e.kind() == std::io::ErrorKind::PermissionDenied => - { - true - } - _ => false, - } || matches!(e.downcast_ref::(), Some(e) if e.kind == tokio_serial::ErrorKind::NoDevice) + let cont = matches!(e.downcast_ref::(), + Some(e) if e.kind() == std::io::ErrorKind::NotFound || e.kind() == std::io::ErrorKind::PermissionDenied) + || matches!(e.downcast_ref::(), Some(e) if e.kind == tokio_serial::ErrorKind::NoDevice) || matches!( e.downcast_ref::>>(), Some(_)