mirror of
https://github.com/uutils/coreutils
synced 2024-07-23 19:04:18 +00:00
clippy: fix warnings introduced by Rust 1.74
This commit is contained in:
parent
7ff4cb3f4e
commit
2f9fcf73fa
|
@ -88,7 +88,7 @@ impl Options {
|
|||
#[uucore::main]
|
||||
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||
let args = args.collect_lossy();
|
||||
let matches = match uu_app().try_get_matches_from(&args) {
|
||||
let matches = match uu_app().try_get_matches_from(args) {
|
||||
Ok(m) => m,
|
||||
Err(e) => return Err(e.into()),
|
||||
};
|
||||
|
|
|
@ -1470,7 +1470,7 @@ fn test_seek_output_fifo() {
|
|||
.args(&["count=0", "seek=1", "of=fifo", "status=noxfer"])
|
||||
.run_no_wait();
|
||||
|
||||
std::fs::write(at.plus("fifo"), &vec![0; 512]).unwrap();
|
||||
std::fs::write(at.plus("fifo"), vec![0; 512]).unwrap();
|
||||
|
||||
child
|
||||
.wait()
|
||||
|
@ -1492,7 +1492,7 @@ fn test_skip_input_fifo() {
|
|||
.args(&["count=0", "skip=1", "if=fifo", "status=noxfer"])
|
||||
.run_no_wait();
|
||||
|
||||
std::fs::write(at.plus("fifo"), &vec![0; 512]).unwrap();
|
||||
std::fs::write(at.plus("fifo"), vec![0; 512]).unwrap();
|
||||
|
||||
child
|
||||
.wait()
|
||||
|
|
|
@ -994,9 +994,9 @@ fn test_ls_long() {
|
|||
fn test_ls_long_format() {
|
||||
let scene = TestScenario::new(util_name!());
|
||||
let at = &scene.fixtures;
|
||||
at.mkdir(&at.plus_as_string("test-long-dir"));
|
||||
at.mkdir(at.plus_as_string("test-long-dir"));
|
||||
at.touch(at.plus_as_string("test-long-dir/test-long-file"));
|
||||
at.mkdir(&at.plus_as_string("test-long-dir/test-long-dir"));
|
||||
at.mkdir(at.plus_as_string("test-long-dir/test-long-dir"));
|
||||
|
||||
for arg in LONG_ARGS {
|
||||
// Assuming sane username do not have spaces within them.
|
||||
|
@ -1971,7 +1971,7 @@ fn test_ls_color() {
|
|||
.join("nested_dir")
|
||||
.to_string_lossy()
|
||||
.to_string();
|
||||
at.mkdir(&nested_dir);
|
||||
at.mkdir(nested_dir);
|
||||
at.mkdir("z");
|
||||
let nested_file = Path::new("a")
|
||||
.join("nested_file")
|
||||
|
|
|
@ -21,11 +21,9 @@ fn test_users_check_name() {
|
|||
#[cfg(target_os = "linux")]
|
||||
let util_name = util_name!();
|
||||
#[cfg(target_vendor = "apple")]
|
||||
let util_name = format!("g{}", util_name!());
|
||||
let util_name = &format!("g{}", util_name!());
|
||||
|
||||
// note: clippy::needless_borrow *false positive*
|
||||
#[allow(clippy::needless_borrow)]
|
||||
let expected = TestScenario::new(&util_name)
|
||||
let expected = TestScenario::new(util_name)
|
||||
.cmd(util_name)
|
||||
.env("LC_ALL", "C")
|
||||
.succeeds()
|
||||
|
|
Loading…
Reference in a new issue