fuzz: fix clippy::collapsible_if

This commit is contained in:
oech3
2026-04-12 15:28:26 +09:00
committed by Daniel Hofstetter
parent affce7094b
commit c0d4cd08eb
2 changed files with 4 additions and 8 deletions
-4
View File
@@ -14,7 +14,3 @@ rustflags = ["-C", "target-feature=+crt-static"]
[env]
# See feat_external_libstdbuf in src/uu/stdbuf/Cargo.toml
LIBSTDBUF_DIR = "/usr/local/libexec/coreutils"
# remove me
[build]
rustflags = ["-A", "clippy::collapsible_if"]
+4 -4
View File
@@ -61,10 +61,10 @@ fn generate_cksum_args() -> Vec<String> {
args.push("-c".to_string());
}
if rng.random_bool(0.25) {
if let Ok(file_path) = generate_random_file() {
args.push(file_path);
}
if rng.random_bool(0.25)
&& let Ok(file_path) = generate_random_file()
{
args.push(file_path);
}
if args.is_empty() || !args.iter().any(|arg| arg.starts_with("file_")) {