Skip to content

Commit 2cfed63

Browse files
authored
Merge pull request #7640 from cakebaker/clippy_fix_warnings_from_rust_1_86
clippy: fix warnings from Rust 1.86
2 parents 7eb267d + 293554e commit 2cfed63

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/uu/yes/src/yes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ mod tests {
157157
];
158158

159159
for (line, final_len) in tests {
160-
let mut v = std::iter::repeat(b'a').take(line).collect::<Vec<_>>();
160+
let mut v = std::iter::repeat_n(b'a', line).collect::<Vec<_>>();
161161
prepare_buffer(&mut v);
162162
assert_eq!(v.len(), final_len);
163163
}

tests/by-util/test_cp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5637,7 +5637,7 @@ mod link_deref {
56375637
let mut args = vec!["--link", "-P", src, DST];
56385638
if r {
56395639
args.push("-R");
5640-
};
5640+
}
56415641
scene.ucmd().args(&args).succeeds().no_stderr();
56425642
at.is_symlink(DST);
56435643
let src_ino = at.symlink_metadata(src).ino();
@@ -5658,7 +5658,7 @@ mod link_deref {
56585658
let mut args = vec!["--link", DANG_LINK, DST];
56595659
if r {
56605660
args.push("-R");
5661-
};
5661+
}
56625662
if !option.is_empty() {
56635663
args.push(option);
56645664
}

tests/by-util/test_dd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use uutests::at_and_ucmd;
88
use uutests::new_ucmd;
99
use uutests::util::TestScenario;
10-
#[cfg(unix)]
10+
#[cfg(all(unix, not(feature = "feat_selinux")))]
1111
use uutests::util::run_ucmd_as_root_with_stdin_stdout;
1212
#[cfg(all(not(windows), feature = "printf"))]
1313
use uutests::util::{UCommand, get_tests_binary};

tests/by-util/test_factor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ fn test_random() {
185185
factors.push(factor);
186186
}
187187
None => break,
188-
};
188+
}
189189
}
190190

191191
factors.sort_unstable();

tests/uutests/src/lib/util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,9 +1374,9 @@ pub struct TerminalSimulation {
13741374

13751375
/// A `UCommand` is a builder wrapping an individual Command that provides several additional features:
13761376
/// 1. it has convenience functions that are more ergonomic to use for piping in stdin, spawning the command
1377-
/// and asserting on the results.
1377+
/// and asserting on the results.
13781378
/// 2. it tracks arguments provided so that in test cases which may provide variations of an arg in loops
1379-
/// the test failure can display the exact call which preceded an assertion failure.
1379+
/// the test failure can display the exact call which preceded an assertion failure.
13801380
/// 3. it provides convenience construction methods to set the Command uutils utility and temporary directory.
13811381
///
13821382
/// Per default `UCommand` runs a command given as an argument in a shell, platform independently.

0 commit comments

Comments
 (0)