Fix signal warnings in release mode

This commit is contained in:
Evan Almloff 2024-07-24 17:55:57 -07:00
parent 8636ada3a4
commit 942e701f02

View file

@ -647,12 +647,15 @@ pub mod warnings {
#[allow(clippy::no_effect)]
impl<T: 'static, S: Storage<SignalData<T>>> Drop for SignalSubscriberDrop<T, S> {
fn drop(&mut self) {
tracing::trace!(
"Write on signal at {} finished, updating subscribers",
self.origin
);
warnings::signal_write_in_component_body(self.origin);
warnings::signal_read_and_write_in_reactive_scope::<T, S>(self.origin, self.signal);
#[cfg(debug_assertions)]
{
tracing::trace!(
"Write on signal at {} finished, updating subscribers",
self.origin
);
warnings::signal_write_in_component_body(self.origin);
warnings::signal_read_and_write_in_reactive_scope::<T, S>(self.origin, self.signal);
}
self.signal.update_subscribers();
}
}