From 71661916bd8fdec465db0f670916a073f817f3dd Mon Sep 17 00:00:00 2001 From: Worapol Worakunsap Date: Tue, 14 Nov 2023 20:07:23 +0700 Subject: [PATCH] fix: debug cannot derive on DefaultEffectStream on expl which has (feature = 'explain') --- src/effector.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/effector.rs b/src/effector.rs index 1bb148b1..c505d411 100644 --- a/src/effector.rs +++ b/src/effector.rs @@ -18,7 +18,6 @@ pub trait EffectorStream: Send + Sync { fn push_effect(&mut self, eft: EffectKind) -> bool; } -#[derive(Clone)] pub struct DefaultEffectStream { done: bool, res: bool, @@ -29,6 +28,18 @@ pub struct DefaultEffectStream { expl: Vec, } +impl Clone for DefaultEffectStream { + fn clone(&self) -> Self { + Self { + done: self.done.clone(), + res: self.res.clone(), + expr: self.expr.clone(), + idx: self.idx.clone(), + cap: self.cap.clone(), + } + } +} + #[derive(Default)] pub struct DefaultEffector;