1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-15 11:36:16 +00:00

fix clippy warnings

This commit is contained in:
Jan Scheer 2021-05-19 01:04:24 +02:00
parent cacd078a49
commit 8032c6d750
4 changed files with 10 additions and 8 deletions

View file

@ -1,4 +1,5 @@
use crate::common::util::*;
#[cfg(any(unix, target_os = "redox"))]
use std::ffi::OsStr;
#[test]
@ -123,6 +124,7 @@ fn test_too_many_args_output() {
);
}
#[cfg(any(unix, target_os = "redox"))]
fn test_invalid_utf8_args(os_str: &OsStr) {
let test_vec = vec![os_str.to_os_string()];
new_ucmd!().args(&test_vec).succeeds().stdout_is("fo<EFBFBD>o\n");

View file

@ -155,7 +155,7 @@ fn test_relpath_no_from_with_d() {
at.mkdir_all(to);
// d is part of subpath -> expect relative path
let mut result_stdout = scene
let _result_stdout = scene
.ucmd()
.arg(to)
.arg(&format!("-d{}", pwd))
@ -163,10 +163,10 @@ fn test_relpath_no_from_with_d() {
.stdout_move_str();
// relax rules for windows test environment
#[cfg(not(windows))]
assert!(Path::new(&result_stdout).is_relative());
assert!(Path::new(&_result_stdout).is_relative());
// d is not part of subpath -> expect absolut path
result_stdout = scene
let result_stdout = scene
.ucmd()
.arg(to)
.arg("-dnon_existing")

View file

@ -43,5 +43,5 @@ fn test_uname_kernel() {
}
#[cfg(not(target_os = "linux"))]
let result = ucmd.arg("-o").succeeds();
ucmd.arg("-o").succeeds();
}