From 8904c3b5c78c2e5c7aa3a295ace5a88f87571191 Mon Sep 17 00:00:00 2001 From: Filipe Rodrigues Date: Wed, 28 May 2025 05:25:21 +0100 Subject: [PATCH] Added `#[track_caller]` to `Effect::{run, try_run}`. --- dynatos-reactive/src/effect.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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,