Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Drop braces from fuzz closure
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Aug 11, 2023
1 parent 80efa3f commit fcf0755
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ publish = false
cargo-fuzz = true

[dependencies]
libfuzzer-sys = "0.4"
libfuzzer-sys = "0.4.7"
unsafe-libyaml = { path = ".." }

[[bin]]
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/load.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use unsafe_libyaml::{
yaml_parser_initialize, yaml_parser_load, yaml_parser_set_input, yaml_parser_t,
};

fuzz_target!(|data: &[u8]| { unsafe { fuzz_target(data) } });
fuzz_target!(|data: &[u8]| unsafe { fuzz_target(data) });

unsafe fn fuzz_target(mut data: &[u8]) {
let mut parser = MaybeUninit::<yaml_parser_t>::uninit();
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use unsafe_libyaml::{
yaml_parser_set_input, yaml_parser_t, YAML_STREAM_END_EVENT,
};

fuzz_target!(|data: &[u8]| { unsafe { fuzz_target(data) } });
fuzz_target!(|data: &[u8]| unsafe { fuzz_target(data) });

unsafe fn fuzz_target(mut data: &[u8]) {
let mut parser = MaybeUninit::<yaml_parser_t>::uninit();
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use unsafe_libyaml::{
yaml_parser_t, yaml_token_delete, yaml_token_t, YAML_STREAM_END_TOKEN,
};

fuzz_target!(|data: &[u8]| { unsafe { fuzz_target(data) } });
fuzz_target!(|data: &[u8]| unsafe { fuzz_target(data) });

unsafe fn fuzz_target(mut data: &[u8]) {
let mut parser = MaybeUninit::<yaml_parser_t>::uninit();
Expand Down

0 comments on commit fcf0755

Please sign in to comment.