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 cargo-fuzz = true
[dependencies] [dependencies]
arbitrary = { version = "1", features = ["derive"] }
itoa = { path = ".." } itoa = { path = ".." }
libfuzzer-sys = { version = "0.4", features = ["arbitrary-derive"] } libfuzzer-sys = "0.4"
[[bin]] [[bin]]
name = "fuzz_itoa" name = "fuzz_itoa"

View File

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