1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

Fix some clippy warnings

Fixed with `cargo clippy --features unix  --fix`
and manually
This commit is contained in:
Sylvestre Ledru 2022-10-12 22:04:21 +02:00
parent 32b1fc6420
commit 6e14dea73b
32 changed files with 122 additions and 126 deletions

View file

@ -81,7 +81,7 @@ fn test_2files() {
// spell-checker:disable-next-line
for (path, data) in [(&file1, "abcdefghijklmnop"), (&file2, "qrstuvwxyz\n")] {
let mut f = File::create(&path).unwrap();
let mut f = File::create(path).unwrap();
assert!(
f.write_all(data.as_bytes()).is_ok(),
"Test setup failed - could not write file"
@ -133,7 +133,7 @@ fn test_from_mixed() {
// spell-checker:disable-next-line
let (data1, data2, data3) = ("abcdefg", "hijklmnop", "qrstuvwxyz\n");
for (path, data) in [(&file1, data1), (&file3, data3)] {
let mut f = File::create(&path).unwrap();
let mut f = File::create(path).unwrap();
assert!(
f.write_all(data.as_bytes()).is_ok(),
"Test setup failed - could not write file"