diff --git a/dynatos-reactive/src/effect.rs b/dynatos-reactive/src/effect.rs index 2cd5849..2245b5a 100644 --- a/dynatos-reactive/src/effect.rs +++ b/dynatos-reactive/src/effect.rs @@ -222,6 +222,7 @@ impl Effect { } /// Runs the effect + #[track_caller] pub fn run(&self) where F: EffectRun + Unsize + 'static, @@ -240,7 +241,8 @@ impl Effect { effect: W::unsize_effect(self.clone()), _phantom: PhantomData, }; - self.gather_dependencies(move || self.inner.run.run(ctx)); + let _gatherer = self.deps_gatherer(); + self.inner.run.run(ctx); } /// Suppresses this effect from running while calling this function @@ -358,6 +360,7 @@ impl WeakEffect { /// Runs this effect, if it exists. /// /// Returns if the effect still existed + #[track_caller] pub fn try_run(&self) -> bool where F: EffectRun + Unsize + 'static,