almost compiles

This commit is contained in:
Dominik Maier 2020-12-12 15:25:34 +01:00
parent 1467d1fa9c
commit 20ad182d9e

View File

@ -221,7 +221,7 @@ where
} }
/// Broker fun /// Broker fun
fn handle_in_broker(&mut self, event: &Event<I>) -> Result<BrokerEventResult, AflError> { fn handle_in_broker(&mut self, event: &Event<I, OT>) -> Result<BrokerEventResult, AflError> {
match event { match event {
Event::NewTestcase { Event::NewTestcase {
sender_id: _, sender_id: _,
@ -293,8 +293,8 @@ where
/// Client fun /// Client fun
fn handle_in_client( fn handle_in_client(
&mut self, &mut self,
event: Event<I>, event: Event<I, OT>,
state: &mut State<I, R>, state: &mut State<I, R, FT>,
corpus: &mut C, corpus: &mut C,
) -> Result<(), AflError> { ) -> Result<(), AflError> {
match event { match event {
@ -340,7 +340,7 @@ where
corpus_size: usize, corpus_size: usize,
start_time: time::Duration, start_time: time::Duration,
client_stats: Vec<ClientStats>, client_stats: Vec<ClientStats>,
phantom: PhantomData<(C, E, I, R)>, phantom: PhantomData<(C, E, I, R, OT, FT)>,
} }
#[cfg(feature = "std")] #[cfg(feature = "std")]
@ -454,18 +454,19 @@ where
} }
#[cfg(feature = "std")] #[cfg(feature = "std")]
impl<C, E, I, R, W> EventManager<C, E, I, R> for LlmpEventManager<C, E, I, R, W> impl<C, E, OT, FT, I, R, W> EventManager<C, E, OT, FT, I, R> for LlmpEventManager<C, E, I, R, W>
where where
C: Corpus<I, R>, C: Corpus<I, R>,
E: Executor<I>, E: Executor<I>,
FT: FeedbacksTuple<I>, FT: FeedbacksTuple<I>,
OT: ObserversTuple,
I: Input, I: Input,
R: Rand, R: Rand,
W: Write, W: Write,
//CE: CustomEvent<I>, //CE: CustomEvent<I>,
{ {
#[inline] #[inline]
fn fire<'a>(&mut self, event: Event<'a, I>) -> Result<(), AflError> { fn fire<'a>(&mut self, event: Event<'a, I, OT>) -> Result<(), AflError> {
let serialized = postcard::to_allocvec(&event)?; let serialized = postcard::to_allocvec(&event)?;
self.send_buf(LLMP_TAG_EVENT_TO_CLIENT, &serialized)?; self.send_buf(LLMP_TAG_EVENT_TO_CLIENT, &serialized)?;
Ok(()) Ok(())