mirror of
https://github.com/uutils/coreutils
synced 2024-11-17 02:08:09 +00:00
Merge pull request #2235 from jhscheer/fix_clippy_warnings
fix clippy warnings
This commit is contained in:
commit
ddf3c9cfcf
4 changed files with 10 additions and 8 deletions
|
@ -276,7 +276,7 @@ impl MountInfo {
|
|||
GetVolumeInformationW(
|
||||
String2LPWSTR!(mount_root),
|
||||
ptr::null_mut(),
|
||||
0 as DWORD,
|
||||
0,
|
||||
ptr::null_mut(),
|
||||
ptr::null_mut(),
|
||||
ptr::null_mut(),
|
||||
|
@ -510,12 +510,12 @@ impl FsUsage {
|
|||
// Total number of free blocks.
|
||||
bfree: number_of_free_clusters as u64,
|
||||
// Total number of free blocks available to non-privileged processes.
|
||||
bavail: 0 as u64,
|
||||
bavail: 0,
|
||||
bavail_top_bit_set: ((bytes_per_sector as u64) & (1u64.rotate_right(1))) != 0,
|
||||
// Total number of file nodes (inodes) on the file system.
|
||||
files: 0 as u64, // Not available on windows
|
||||
files: 0, // Not available on windows
|
||||
// Total number of free file nodes (inodes).
|
||||
ffree: 4096 as u64, // Meaningless on Windows
|
||||
ffree: 4096, // Meaningless on Windows
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -43,5 +43,5 @@ fn test_uname_kernel() {
|
|||
}
|
||||
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
let result = ucmd.arg("-o").succeeds();
|
||||
ucmd.arg("-o").succeeds();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue