about summary refs log tree commit diff
path: root/custom_mutators/rust/example/src
diff options
context:
space:
mode:
Diffstat (limited to 'custom_mutators/rust/example/src')
-rw-r--r--custom_mutators/rust/example/src/example_mutator.rs (renamed from custom_mutators/rust/example/src/lib.rs)7
1 files changed, 3 insertions, 4 deletions
diff --git a/custom_mutators/rust/example/src/lib.rs b/custom_mutators/rust/example/src/example_mutator.rs
index 4f9345c0..9b9d4997 100644
--- a/custom_mutators/rust/example/src/lib.rs
+++ b/custom_mutators/rust/example/src/example_mutator.rs
@@ -1,14 +1,13 @@
 #![allow(unused_variables)]
 
 use custom_mutator::{export_mutator, CustomMutator};
-use std::os::raw::c_uint;
 
 struct ExampleMutator;
 
 impl CustomMutator for ExampleMutator {
     type Error = ();
 
-    fn init(seed: c_uint) -> Result<Self, ()> {
+    fn init(seed: u32) -> Result<Self, Self::Error> {
         Ok(Self)
     }
 
@@ -17,7 +16,7 @@ impl CustomMutator for ExampleMutator {
         buffer: &'b mut [u8],
         add_buff: Option<&[u8]>,
         max_size: usize,
-    ) -> Result<Option<&'b [u8]>, ()> {
+    ) -> Result<Option<&'b [u8]>, Self::Error> {
         buffer.reverse();
         Ok(Some(buffer))
     }
@@ -30,7 +29,7 @@ struct OwnBufferExampleMutator {
 impl CustomMutator for OwnBufferExampleMutator {
     type Error = ();
 
-    fn init(seed: c_uint) -> Result<Self, ()> {
+    fn init(seed: u32) -> Result<Self, Self::Error> {
         Ok(Self {
             own_buffer: Vec::new(),
         })