Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
buj committed Aug 25, 2024
1 parent 0a1fa7f commit 451c8f7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
13 changes: 5 additions & 8 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,11 @@ pub fn parse_args() -> Config {

if x.starts_with("compression ") {
if let Ok(value) = x.split_once(' ').unwrap().1.parse::<i64>() {
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);
Expand Down
7 changes: 5 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 451c8f7

Please sign in to comment.