diff options
author | Dominik Maier <domenukk@gmail.com> | 2021-02-27 15:52:36 +0100 |
---|---|---|
committer | Dominik Maier <domenukk@gmail.com> | 2021-02-27 15:52:36 +0100 |
commit | c219502f0fe654927c3f74f9791f786f0740f344 (patch) | |
tree | f6960facbd01bf0573199a9320aeb94a32653f1b /custom_mutators/rust/example_lain | |
parent | a5da9ce42cab1eab93cf80ca744944ae26e6ab58 (diff) | |
download | afl++-c219502f0fe654927c3f74f9791f786f0740f344.tar.gz |
some rust cleanup
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(), |