mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
chore: use inline formatting
Minor cleanup using clippy autofix. This makes the code a bit more readable, and helps spot a few inefficiencies and possible bugs. ``` cargo clippy --fix --workspace -- -A clippy::all -W clippy::uninlined_format_args && cargo fmt ```
This commit is contained in:
parent
b7bf8c9467
commit
47b10539d0
17 changed files with 33 additions and 39 deletions
|
@ -6093,9 +6093,7 @@ fn test_cp_preserve_xattr_readonly_source() {
|
|||
let stdout = String::from_utf8_lossy(&getfattr_output.stdout);
|
||||
assert!(
|
||||
stdout.contains(xattr_key),
|
||||
"Expected '{}' not found in getfattr output:\n{}",
|
||||
xattr_key,
|
||||
stdout
|
||||
"Expected '{xattr_key}' not found in getfattr output:\n{stdout}"
|
||||
);
|
||||
|
||||
at.set_readonly(source_file);
|
||||
|
|
|
@ -1457,7 +1457,7 @@ fn create_named_pipe_with_writer(path: &str, data: &str) -> std::process::Child
|
|||
nix::unistd::mkfifo(path, nix::sys::stat::Mode::S_IRWXU).unwrap();
|
||||
std::process::Command::new("sh")
|
||||
.arg("-c")
|
||||
.arg(format!("printf '{}' > {path}", data))
|
||||
.arg(format!("printf '{data}' > {path}"))
|
||||
.spawn()
|
||||
.unwrap()
|
||||
}
|
||||
|
|
|
@ -435,7 +435,7 @@ fn test_all_but_last_bytes_large_file_piped() {
|
|||
.len();
|
||||
scene
|
||||
.ucmd()
|
||||
.args(&["-c", &format!("-{}", seq_19001_20000_file_length)])
|
||||
.args(&["-c", &format!("-{seq_19001_20000_file_length}")])
|
||||
.pipe_in_fixture(seq_20000_file_name)
|
||||
.succeeds()
|
||||
.stdout_only_fixture(seq_19000_file_name);
|
||||
|
@ -695,7 +695,7 @@ fn test_validate_stdin_offset_bytes() {
|
|||
.len();
|
||||
scene
|
||||
.ucmd()
|
||||
.args(&["-c", &format!("-{}", seq_19001_20000_file_length)])
|
||||
.args(&["-c", &format!("-{seq_19001_20000_file_length}")])
|
||||
.set_stdin(file)
|
||||
.succeeds()
|
||||
.stdout_only_fixture(seq_19000_file_name);
|
||||
|
|
|
@ -20,7 +20,7 @@ fn init() {
|
|||
std::env::set_var("UUTESTS_BINARY_PATH", TESTS_BINARY);
|
||||
}
|
||||
// Print for debugging
|
||||
eprintln!("Setting UUTESTS_BINARY_PATH={}", TESTS_BINARY);
|
||||
eprintln!("Setting UUTESTS_BINARY_PATH={TESTS_BINARY}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue