diff options
Diffstat (limited to 'custom_mutators/rust/example_lain')
-rw-r--r-- | custom_mutators/rust/example_lain/Cargo.toml | 4 | ||||
-rw-r--r-- | custom_mutators/rust/example_lain/src/lain_mutator.rs (renamed from custom_mutators/rust/example_lain/src/lib.rs) | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/custom_mutators/rust/example_lain/Cargo.toml b/custom_mutators/rust/example_lain/Cargo.toml index 1f68c7e0..29d606a4 100644 --- a/custom_mutators/rust/example_lain/Cargo.toml +++ b/custom_mutators/rust/example_lain/Cargo.toml @@ -10,5 +10,7 @@ edition = "2018" custom_mutator = { path = "../custom_mutator" } lain="0.5" -[lib] +[[example]] +name = "example_lain" +path = "./src/lain_mutator.rs" crate-type = ["cdylib"] \ No newline at end of file diff --git a/custom_mutators/rust/example_lain/src/lib.rs b/custom_mutators/rust/example_lain/src/lain_mutator.rs index 3336e861..22e5fe73 100644 --- a/custom_mutators/rust/example_lain/src/lib.rs +++ b/custom_mutators/rust/example_lain/src/lain_mutator.rs @@ -4,7 +4,6 @@ use lain::{ prelude::*, rand::{rngs::StdRng, SeedableRng}, }; -use std::os::raw::c_uint; #[derive(Debug, Mutatable, NewFuzzed, BinarySerialize)] struct MyStruct { @@ -31,7 +30,7 @@ struct LainMutator { impl CustomMutator for LainMutator { type Error = (); - fn init(seed: c_uint) -> Result<Self, ()> { + fn init(seed: u32) -> Result<Self, ()> { Ok(Self { mutator: Mutator::new(StdRng::seed_from_u64(seed as u64)), buffer: Vec::new(), |