mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 06:34:20 +00:00
Fix signal warnings in release mode
This commit is contained in:
parent
8636ada3a4
commit
942e701f02
1 changed files with 9 additions and 6 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue