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(_)