Skip to content

Commit c0d4cd0

Browse files
oech3cakebaker
authored andcommitted
fuzz: fix clippy::collapsible_if
1 parent affce70 commit c0d4cd0

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

.cargo/config.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,3 @@ rustflags = ["-C", "target-feature=+crt-static"]
1414
[env]
1515
# See feat_external_libstdbuf in src/uu/stdbuf/Cargo.toml
1616
LIBSTDBUF_DIR = "/usr/local/libexec/coreutils"
17-
18-
# remove me
19-
[build]
20-
rustflags = ["-A", "clippy::collapsible_if"]

fuzz/fuzz_targets/fuzz_cksum.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ fn generate_cksum_args() -> Vec<String> {
6161
args.push("-c".to_string());
6262
}
6363

64-
if rng.random_bool(0.25) {
65-
if let Ok(file_path) = generate_random_file() {
66-
args.push(file_path);
67-
}
64+
if rng.random_bool(0.25)
65+
&& let Ok(file_path) = generate_random_file()
66+
{
67+
args.push(file_path);
6868
}
6969

7070
if args.is_empty() || !args.iter().any(|arg| arg.starts_with("file_")) {

0 commit comments

Comments
 (0)