Skip to content

Commit

Permalink
update dependencies, run clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
magiclen committed Nov 4, 2022
1 parent f1b373a commit 1b26127
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "xcompress"
version = "0.11.7"
version = "0.11.8"
authors = ["Magic Len <[email protected]>"]
edition = "2021"
repository = "https://github.com/magiclen/xcompress"
Expand All @@ -18,9 +18,9 @@ codegen-units = 1
panic = "abort"

[dependencies]
clap = "3.1.6"
clap = "3.2.23"
concat-with = "0.2"
terminal_size = "0.1"
terminal_size = "0.2"

execute = "0.2.4"
num_cpus = "1.8.0"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ EXECUTABLE_NAME := xcompress

all: ./target/x86_64-unknown-linux-musl/release/$(EXECUTABLE_NAME)

./target/x86_64-unknown-linux-musl/release/$(EXECUTABLE_NAME): $(shell find . -type f -iname '*.rs' -o -name 'Cargo.toml' | sed 's/ /\\ /g')
./target/x86_64-unknown-linux-musl/release/$(EXECUTABLE_NAME): $(shell find . -type f -iname '*.rs' -o -name 'Cargo.toml' | grep -v ./target | sed 's/ /\\ /g')
cargo build --release --target x86_64-unknown-linux-musl
strip ./target/x86_64-unknown-linux-musl/release/$(EXECUTABLE_NAME)

Expand Down
32 changes: 16 additions & 16 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ fn handle_archive(
}

if best_compression {
command2.args(&["-9", "-e"]);
command2.args(["-9", "-e"]);
}

command2.stdout(File::create(output_path.as_ref())?);
Expand Down Expand Up @@ -538,7 +538,7 @@ fn handle_archive(
}

if best_compression {
command2.args(&["-9", "-e"]);
command2.args(["-9", "-e"]);
}

command2.stdout(File::create(output_path.as_ref())?);
Expand Down Expand Up @@ -577,7 +577,7 @@ fn handle_archive(
}

if best_compression {
command2.args(&["-9", "-e"]);
command2.args(["-9", "-e"]);
}

command2.stdout(File::create(output_path.as_ref())?);
Expand Down Expand Up @@ -614,7 +614,7 @@ fn handle_archive(
}

if best_compression {
command2.args(&["-9", "-e"]);
command2.args(["-9", "-e"]);
}

command2.stdout(File::create(output_path.as_ref())?);
Expand Down Expand Up @@ -655,7 +655,7 @@ fn handle_archive(
);

if best_compression {
command2.args(&["-m0=lzma2", "-mx", "-ms=on"]);
command2.args(["-m0=lzma2", "-mx", "-ms=on"]);
}

if !password.is_empty() {
Expand Down Expand Up @@ -708,7 +708,7 @@ fn handle_archive(
}

if best_compression {
command2.args(&["--ultra", "-22"]);
command2.args(["--ultra", "-22"]);
}

let output = command1.execute_multiple_output(&mut [&mut command2])?;
Expand All @@ -726,7 +726,7 @@ fn handle_archive(
}

if best_compression {
command2.args(&["--ultra", "-22"]);
command2.args(["--ultra", "-22"]);
}

let output = command1.execute_multiple_output(&mut [&mut command2])?;
Expand Down Expand Up @@ -1088,7 +1088,7 @@ fn handle_archive(
}

if best_compression {
command.args(&["-9", "-e"]);
command.args(["-9", "-e"]);
}

command.stdout(File::create(output_path.as_ref())?);
Expand Down Expand Up @@ -1123,7 +1123,7 @@ fn handle_archive(
}

if best_compression {
command.args(&["-9", "-e"]);
command.args(["-9", "-e"]);
}

command.stdout(File::create(output_path.as_ref())?);
Expand Down Expand Up @@ -1167,7 +1167,7 @@ fn handle_archive(
}

if best_compression {
command.args(&["-9", "-e"]);
command.args(["-9", "-e"]);
}

command.stdout(File::create(output_path.as_ref())?);
Expand Down Expand Up @@ -1202,7 +1202,7 @@ fn handle_archive(
}

if best_compression {
command.args(&["-9", "-e"]);
command.args(["-9", "-e"]);
}

command.stdout(File::create(output_path.as_ref())?);
Expand Down Expand Up @@ -1236,7 +1236,7 @@ fn handle_archive(
command_args!(p7z_path, "a", "-t7z", "-aoa", format!("-mmt{}", threads));

if best_compression {
command.args(&["-m0=lzma2", "-mx", "-ms=on"]);
command.args(["-m0=lzma2", "-mx", "-ms=on"]);
}

if !password.is_empty() {
Expand Down Expand Up @@ -1413,7 +1413,7 @@ fn handle_archive(
let mut command = command_args!(rar_path, "a", "-ep1", format!("-mt{}", threads));

if best_compression {
command.args(&["-ma5", "-m5", "-s"]);
command.args(["-ma5", "-m5", "-s"]);
}

if !password.is_empty() {
Expand Down Expand Up @@ -1470,7 +1470,7 @@ fn handle_archive(
}

if best_compression {
command.args(&["--ultra", "-22"]);
command.args(["--ultra", "-22"]);
}

let output = command.execute_output()?;
Expand All @@ -1488,7 +1488,7 @@ fn handle_archive(
}

if best_compression {
command.args(&["--ultra", "-22"]);
command.args(["--ultra", "-22"]);
}

let output = command.execute_output()?;
Expand Down Expand Up @@ -2180,7 +2180,7 @@ fn handle_extract(
command.arg("-qq");
}

command.args(&["-O", "UTF-8", "-o"]);
command.args(["-O", "UTF-8", "-o"]);
command.arg(input_path);
command.arg("-d");
command.arg(output_path.as_ref());
Expand Down

0 comments on commit 1b26127

Please sign in to comment.