serzhiio 2 年之前
父节点
当前提交
0439072a45
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      packages/fermi/src/hooks/atom_ref.rs

+ 1 - 2
packages/fermi/src/hooks/atom_ref.rs

@@ -4,7 +4,6 @@ use std::{
     cell::{Ref, RefCell, RefMut},
     cell::{Ref, RefCell, RefMut},
     rc::Rc,
     rc::Rc,
 };
 };
-use std::ops::DerefMut;
 
 
 ///
 ///
 ///
 ///
@@ -74,7 +73,7 @@ impl<T: 'static> UseAtomRef<T> {
     /// This is silent operation
     /// This is silent operation
     /// call `.force_update()` manually if required
     /// call `.force_update()` manually if required
     pub fn with_mut_silent(&self, cb: impl FnOnce(&mut T)) {
     pub fn with_mut_silent(&self, cb: impl FnOnce(&mut T)) {
-        cb(self.write_silent().deref_mut())
+        cb(&mut *self.write_silent())
     }
     }
 
 
     pub fn write(&self) -> RefMut<T> {
     pub fn write(&self) -> RefMut<T> {