mirror of
https://github.com/uutils/findutils.git
synced 2026-06-10 15:48:30 -07:00
Merge pull request #357 from hanbings/clippy
clippy: Fix clippy warning.
This commit is contained in:
@@ -600,14 +600,14 @@ mod tests {
|
||||
|
||||
// modified time test
|
||||
let modified_matcher = NewerTimeMatcher::new(NewerOptionType::Modified, time);
|
||||
let mut buffer = [0; 10];
|
||||
let buffer = [0; 10];
|
||||
{
|
||||
let mut file = OpenOptions::new()
|
||||
.read(true)
|
||||
.write(true)
|
||||
.open(&foo_path)
|
||||
.expect("open temp file");
|
||||
let _ = file.write(&mut buffer);
|
||||
let _ = file.write(&buffer);
|
||||
}
|
||||
assert!(
|
||||
modified_matcher.matches(&file_info, &mut deps.new_matcher_io()),
|
||||
|
||||
+2
-2
@@ -996,7 +996,7 @@ mod tests {
|
||||
use std::{path::Path, process::Command};
|
||||
|
||||
let path = Path::new("./test_data/no_permission");
|
||||
let _result = fs::create_dir(&path);
|
||||
let _result = fs::create_dir(path);
|
||||
// Generate files without permissions.
|
||||
// std::fs cannot change file permissions to 000 in normal user state,
|
||||
// so use chmod via Command to change permissions.
|
||||
@@ -1016,7 +1016,7 @@ mod tests {
|
||||
uucore::error::set_exit_code(0);
|
||||
|
||||
if path.exists() {
|
||||
let _result = fs::create_dir(&path);
|
||||
let _result = fs::create_dir(path);
|
||||
// Remove the unreadable and writable status of the file to avoid affecting other tests.
|
||||
let _output = Command::new("chmod")
|
||||
.arg("+rwx")
|
||||
|
||||
Reference in New Issue
Block a user