From b6e556387c36047d0b97661cb98bdc21282a0bfa Mon Sep 17 00:00:00 2001 From: Dan Nixon Date: Tue, 28 May 2024 16:58:55 +0000 Subject: [PATCH] Require mutators to be Send and Sync --- client/src/schedule/mutation/mod.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/client/src/schedule/mutation/mod.rs b/client/src/schedule/mutation/mod.rs index c1ab8d5..05945a7 100644 --- a/client/src/schedule/mutation/mod.rs +++ b/client/src/schedule/mutation/mod.rs @@ -12,23 +12,25 @@ pub use self::{ }; use super::event::Event; +pub type BoxedMutator = Box; + #[derive(Default)] pub struct Mutators { - mutators: Vec>, + mutators: Vec, } impl Mutators { - pub fn new(mutators: Vec>) -> Self { + pub fn new(mutators: Vec) -> Self { Self { mutators } } - pub fn new_single(mutator: Box) -> Self { + pub fn new_single(mutator: BoxedMutator) -> Self { Self { mutators: vec![mutator], } } - pub fn push(&mut self, mutator: Box) { + pub fn push(&mut self, mutator: BoxedMutator) { self.mutators.push(mutator); }