Explorar el Código

pass the information on previous caller on clone

niedzwiedzw hace 2 años
padre
commit
9154b0f8ea
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      packages/hooks/src/use_shared_state.rs

+ 1 - 1
packages/hooks/src/use_shared_state.rs

@@ -365,7 +365,7 @@ impl<T> Clone for UseSharedState<T> {
         Self {
             inner: self.inner.clone(),
             #[cfg(debug_assertions)]
-            previous_borrow: Default::default(),
+            previous_borrow: self.previous_borrow.clone(),
         }
     }
 }