mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
Merge pull request #7640 from cakebaker/clippy_fix_warnings_from_rust_1_86
clippy: fix warnings from Rust 1.86
This commit is contained in:
commit
2cfed639d3
5 changed files with 7 additions and 7 deletions
|
@ -157,7 +157,7 @@ mod tests {
|
|||
];
|
||||
|
||||
for (line, final_len) in tests {
|
||||
let mut v = std::iter::repeat(b'a').take(line).collect::<Vec<_>>();
|
||||
let mut v = std::iter::repeat_n(b'a', line).collect::<Vec<_>>();
|
||||
prepare_buffer(&mut v);
|
||||
assert_eq!(v.len(), final_len);
|
||||
}
|
||||
|
|
|
@ -5637,7 +5637,7 @@ mod link_deref {
|
|||
let mut args = vec!["--link", "-P", src, DST];
|
||||
if r {
|
||||
args.push("-R");
|
||||
};
|
||||
}
|
||||
scene.ucmd().args(&args).succeeds().no_stderr();
|
||||
at.is_symlink(DST);
|
||||
let src_ino = at.symlink_metadata(src).ino();
|
||||
|
@ -5658,7 +5658,7 @@ mod link_deref {
|
|||
let mut args = vec!["--link", DANG_LINK, DST];
|
||||
if r {
|
||||
args.push("-R");
|
||||
};
|
||||
}
|
||||
if !option.is_empty() {
|
||||
args.push(option);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
use uutests::at_and_ucmd;
|
||||
use uutests::new_ucmd;
|
||||
use uutests::util::TestScenario;
|
||||
#[cfg(unix)]
|
||||
#[cfg(all(unix, not(feature = "feat_selinux")))]
|
||||
use uutests::util::run_ucmd_as_root_with_stdin_stdout;
|
||||
#[cfg(all(not(windows), feature = "printf"))]
|
||||
use uutests::util::{UCommand, get_tests_binary};
|
||||
|
|
|
@ -185,7 +185,7 @@ fn test_random() {
|
|||
factors.push(factor);
|
||||
}
|
||||
None => break,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
factors.sort_unstable();
|
||||
|
|
|
@ -1374,9 +1374,9 @@ pub struct TerminalSimulation {
|
|||
|
||||
/// A `UCommand` is a builder wrapping an individual Command that provides several additional features:
|
||||
/// 1. it has convenience functions that are more ergonomic to use for piping in stdin, spawning the command
|
||||
/// and asserting on the results.
|
||||
/// and asserting on the results.
|
||||
/// 2. it tracks arguments provided so that in test cases which may provide variations of an arg in loops
|
||||
/// the test failure can display the exact call which preceded an assertion failure.
|
||||
/// the test failure can display the exact call which preceded an assertion failure.
|
||||
/// 3. it provides convenience construction methods to set the Command uutils utility and temporary directory.
|
||||
///
|
||||
/// Per default `UCommand` runs a command given as an argument in a shell, platform independently.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue