Depend on arbitrary crate directly

This commit is contained in:
David Tolnay 2022-05-15 13:42:01 -07:00
parent 534011840c
commit 6ba4e7ca6c
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 6 additions and 4 deletions

View File

@ -8,8 +8,9 @@ edition = "2018"
cargo-fuzz = true
[dependencies]
arbitrary = { version = "1", features = ["derive"] }
itoa = { path = ".." }
libfuzzer-sys = { version = "0.4", features = ["arbitrary-derive"] }
libfuzzer-sys = "0.4"
[[bin]]
name = "fuzz_itoa"

View File

@ -1,8 +1,9 @@
#![no_main]
use libfuzzer_sys::arbitrary;
use arbitrary::Arbitrary;
use libfuzzer_sys::fuzz_target;
#[derive(arbitrary::Arbitrary, Debug, Clone)]
#[derive(Arbitrary, Debug, Clone)]
enum IntegerInput {
I8(i8),
U8(u8),
@ -18,7 +19,7 @@ enum IntegerInput {
U128(u128),
}
#[derive(arbitrary::Arbitrary, Debug, Clone)]
#[derive(Arbitrary, Debug, Clone)]
struct Inputs {
inputs: Vec<IntegerInput>,
}