1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

clippy: fix warnings introduced with Rust 1.67.0

This commit is contained in:
Daniel Hofstetter 2023-01-27 10:29:45 +01:00
parent fc7e51a4f8
commit f6b646e4e5
172 changed files with 835 additions and 1034 deletions

View file

@ -70,7 +70,7 @@ fn test_tee_append() {
fn test_tee_no_more_writeable_1() {
// equals to 'tee /dev/full out2 <multi_read' call
let (at, mut ucmd) = at_and_ucmd!();
let content = (1..=10).map(|x| format!("{}\n", x)).collect::<String>();
let content = (1..=10).map(|x| format!("{x}\n")).collect::<String>();
let file_out = "tee_file_out";
ucmd.arg("/dev/full")
@ -90,7 +90,7 @@ fn test_tee_no_more_writeable_2() {
// but currently there is no way to redirect stdout to /dev/full
// so this test is disabled
let (_at, mut ucmd) = at_and_ucmd!();
let _content = (1..=10).map(|x| format!("{}\n", x)).collect::<String>();
let _content = (1..=10).map(|x| format!("{x}\n")).collect::<String>();
let file_out_a = "tee_file_out_a";
let file_out_b = "tee_file_out_b";
@ -130,7 +130,7 @@ mod linux_only {
}
fn run_tee(proc: &mut UCommand) -> (String, Output) {
let content = (1..=100000).map(|x| format!("{}\n", x)).collect::<String>();
let content = (1..=100000).map(|x| format!("{x}\n")).collect::<String>();
#[allow(deprecated)]
let output = proc
@ -204,9 +204,7 @@ mod linux_only {
contents.len()
);
assert!(contents.starts_with(&compare),
"Expected truncated output to be a prefix of the correct output, but it isn't.\n Correct: {}\n Compare: {}",
contents,
compare);
"Expected truncated output to be a prefix of the correct output, but it isn't.\n Correct: {contents}\n Compare: {compare}");
}
#[test]