From f24f23faa240053b7ac8f65b69ff8d1ae0ad3ea1 Mon Sep 17 00:00:00 2001 From: Eskil Queseth Date: Mon, 14 Jun 2021 13:44:08 +0200 Subject: clippy --- mumd/src/main.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'mumd/src/main.rs') diff --git a/mumd/src/main.rs b/mumd/src/main.rs index 8d278c0..6a70586 100644 --- a/mumd/src/main.rs +++ b/mumd/src/main.rs @@ -37,9 +37,7 @@ use tokio_util::codec::{FramedRead, FramedWrite, LengthDelimitedCodec}; #[tokio::main] async fn main() { - if std::env::args() - .find(|s| s.as_str() == "--version") - .is_some() + if std::env::args().any(|s| s.as_str() == "--version") { println!("mumd {}", env!("VERSION")); return; @@ -94,12 +92,9 @@ async fn main() { _ = receive_commands(command_sender).fuse() => Ok(()), }; - match run { - Err(e) => { - error!("mumd: {}", e); - std::process::exit(1); - } - _ => {} + if let Err(e) = run { + error!("mumd: {}", e); + std::process::exit(1); } } -- cgit v1.2.1