From 451c8f7e003448fe5e3234a987282a86a76c1a51 Mon Sep 17 00:00:00 2001 From: buj Date: Sun, 25 Aug 2024 14:48:55 +0700 Subject: [PATCH] cargo fmt --- src/config.rs | 13 +++++-------- src/main.rs | 7 +++++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/config.rs b/src/config.rs index 686cec2..d958d86 100644 --- a/src/config.rs +++ b/src/config.rs @@ -120,14 +120,11 @@ pub fn parse_args() -> Config { if x.starts_with("compression ") { if let Ok(value) = x.split_once(' ').unwrap().1.parse::() { - if compression - .replace(value) - .is_some() - { - eprintln!("{exe}: cannot set multiple compression levels"); - exit(-1); - } - continue; + if compression.replace(value).is_some() { + eprintln!("{exe}: cannot set multiple compression levels"); + exit(-1); + } + continue; } else { eprintln!("{exe}: invalid compression value"); exit(-1); diff --git a/src/main.rs b/src/main.rs index 1356a24..526103b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -192,8 +192,11 @@ fn main() { } } - println!("Added file {}", format!("{name}/{}", x.file_name().into_string().unwrap()) - .trim_start_matches('/')); + println!( + "Added file {}", + format!("{name}/{}", x.file_name().into_string().unwrap()) + .trim_start_matches('/') + ); } else { walk( x.path(),