Skip to content

Commit d8df9b4

Browse files
authored
Fix Clippy (#2913)
* clp * lol * this is false positive * a * clippy all * aa
1 parent fd6271f commit d8df9b4

File tree

49 files changed

+91
-84
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+91
-84
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ members = [
2525
"utils/gramatron/construct_automata",
2626
"utils/libafl_benches",
2727
"utils/libafl_jumper",
28-
"bindings/pylibafl",
2928
]
29+
3030
default-members = [
3131
"libafl",
3232
"libafl_bolts",
@@ -36,6 +36,7 @@ default-members = [
3636
]
3737

3838
exclude = [
39+
"bindings/pylibafl",
3940
"fuzzers",
4041
"libafl_libfuzzer_runtime",
4142
"utils/noaslr",

bindings/pylibafl/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ edition = "2021"
99
categories = ["development-tools::testing", "emulators", "embedded", "os"]
1010

1111
[dependencies]
12-
pyo3 = { workspace = true, features = ["extension-module"] }
12+
pyo3 = { version = "0.23.2", features = ["extension-module"] }
1313
pyo3-log = { version = "0.12.0" }
1414
libafl_sugar = { path = "../../libafl_sugar", version = "0.15.0", features = [
1515
"python",
@@ -24,7 +24,7 @@ libafl_qemu = { path = "../../libafl_qemu", version = "0.15.0", features = [
2424
] }
2525

2626
[build-dependencies]
27-
pyo3-build-config = { workspace = true }
27+
pyo3-build-config = "0.23.2"
2828

2929
[lib]
3030
name = "pylibafl"

fuzzers/forkserver/libafl-fuzz/src/env_parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub fn parse_envs(opt: &mut Opt) -> Result<(), Error> {
4040
if let Ok(res) = std::env::var("AFL_MAP_SIZE") {
4141
let map_size = validate_map_size(res.parse()?)?;
4242
opt.map_size = Some(map_size);
43-
};
43+
}
4444
if let Ok(res) = std::env::var("AFL_IGNORE_TIMEOUT") {
4545
opt.ignore_timeouts = parse_bool(&res)?;
4646
}

fuzzers/forkserver/libafl-fuzz/src/fuzzer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ define_run_client!(state, mgr, fuzzer_dir, core_id, opt, is_main_node, {
363363
// Enable autodict if configured
364364
if !opt.no_autodict {
365365
executor_builder = executor_builder.autotokens(&mut tokens);
366-
};
366+
}
367367

368368
// Finalize and build our Executor
369369
SupportedExecutors::Forkserver(

fuzzers/forkserver/libafl-fuzz/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ fn main() {
199199
Ok(()) => unreachable!(),
200200
Err(Error::ShuttingDown) => println!("Fuzzing stopped by user. Good bye."),
201201
Err(err) => panic!("Failed to run launcher: {err:?}"),
202-
};
202+
}
203203
}
204204

205205
#[expect(clippy::struct_excessive_bools)]

libafl/src/common/nautilus/grammartec/tree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ impl<'data, 'tree: 'data, 'ctx: 'data, W: Write, T: TreeLike> Unparser<'data, 't
5757
Some(UnparseStep::Script(num, expr)) => self.unwrap_script(num, &expr),
5858
Some(UnparseStep::PushBuffer()) => self.push_buffer(),
5959
None => return false,
60-
};
60+
}
6161
true
6262
}
6363

libafl/src/corpus/inmemory_ondisk.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ mod tests {
486486
Ok(None) => (),
487487
Ok(_) => panic!("File {path:?} did not exist even though it should have?"),
488488
Err(e) => panic!("An unexpected error occurred: {e}"),
489-
};
489+
}
490490
drop(f);
491491
fs::remove_file(path).unwrap();
492492
}

libafl/src/events/launcher.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ where
330330
client_description,
331331
);
332332
}
333-
};
333+
}
334334
}
335335
}
336336
}
@@ -829,7 +829,7 @@ where
829829
Err(Error::shutting_down())
830830
}
831831
}?,
832-
};
832+
}
833833
}
834834
}
835835
}
@@ -902,7 +902,7 @@ where
902902
if let Some(remote_broker_addr) = self.remote_broker_addr {
903903
log::info!("B2b: Connecting to {:?}", &remote_broker_addr);
904904
broker.inner_mut().connect_b2b(remote_broker_addr)?;
905-
};
905+
}
906906

907907
broker.set_exit_after(exit_cleanly_after);
908908

libafl/src/events/llmp/restarting.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ where
831831
if let Some(remote_broker_addr) = remote_broker_addr {
832832
log::info!("B2b: Connecting to {:?}", &remote_broker_addr);
833833
broker.inner_mut().connect_b2b(remote_broker_addr)?;
834-
};
834+
}
835835

836836
if let Some(exit_cleanly_after) = self.exit_cleanly_after {
837837
broker.set_exit_after(exit_cleanly_after);

libafl/src/events/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,6 @@ mod tests {
901901
assert_eq!("test", o.0.name());
902902
}
903903
_ => panic!("mistmatch"),
904-
};
904+
}
905905
}
906906
}

0 commit comments

Comments
 (0)