From 641bc1b99234fb9ac93f7971db112df23d60b114 Mon Sep 17 00:00:00 2001 From: Pierre Hubert Date: Tue, 30 Aug 2022 10:40:30 +0200 Subject: [PATCH] Cargo clippy --- tcp_relay_server/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcp_relay_server/src/main.rs b/tcp_relay_server/src/main.rs index 281c429..3ae8256 100644 --- a/tcp_relay_server/src/main.rs +++ b/tcp_relay_server/src/main.rs @@ -43,12 +43,12 @@ async fn main() -> std::io::Result<()> { let args: Args = Args::parse(); let args = Arc::new(args); - if args.ports.len() == 0 { + if args.ports.is_empty() { log::error!("No port to forward!"); std::process::exit(2); } - if args.tokens.len() == 0 { + if args.tokens.is_empty() { log::error!("No tokens specified!"); std::process::exit(3); }