refactor(clippy): 📦 Fix clippy error with matches!()

This commit is contained in:
Berkus Decker 2022-09-08 20:07:11 +03:00 committed by Berkus Decker
parent 3fd8c16b16
commit 9b35283ca6
1 changed files with 3 additions and 9 deletions

View File

@ -416,15 +416,9 @@ async fn main() -> Result<()> {
execute!(stdout, style::Print(format!("\nError: {:?}\n", e)))?;
stdout.flush()?;
let cont = match e.downcast_ref::<std::io::Error>() {
Some(e)
if e.kind() == std::io::ErrorKind::NotFound
|| e.kind() == std::io::ErrorKind::PermissionDenied =>
{
true
}
_ => false,
} || matches!(e.downcast_ref::<tokio_serial::Error>(), Some(e) if e.kind == tokio_serial::ErrorKind::NoDevice)
let cont = matches!(e.downcast_ref::<std::io::Error>(),
Some(e) if e.kind() == std::io::ErrorKind::NotFound || e.kind() == std::io::ErrorKind::PermissionDenied)
|| matches!(e.downcast_ref::<tokio_serial::Error>(), Some(e) if e.kind == tokio_serial::ErrorKind::NoDevice)
|| matches!(
e.downcast_ref::<tokio::sync::mpsc::error::SendError<Vec<u8>>>(),
Some(_)