浏览代码

fix signals with debug information

Evan Almloff 1 年之前
父节点
当前提交
1c2a6fa010
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      packages/signals/src/signal.rs

+ 3 - 3
packages/signals/src/signal.rs

@@ -237,9 +237,9 @@ impl<T: 'static> Signal<T> {
     /// Get the current value of the signal. **Unlike read, this will not subscribe the current scope to the signal which can cause parts of your UI to not update.**
     ///
     /// If the signal has been dropped, this will panic.
-    pub fn peak(&self) -> Ref<T> {
+    pub fn peak(&self) -> GenerationalRef<T> {
         let inner = self.inner.read();
-        Ref::map(inner, |v| &v.value)
+        GenerationalRef::map(inner, |v| &v.value)
     }
 
     /// Get a mutable reference to the signal's value.
@@ -439,7 +439,7 @@ impl<T: 'static> ReadOnlySignal<T> {
     /// Get the current value of the signal. **Unlike read, this will not subscribe the current scope to the signal which can cause parts of your UI to not update.**
     ///
     /// If the signal has been dropped, this will panic.
-    pub fn peak(&self) -> Ref<T> {
+    pub fn peak(&self) -> GenerationalRef<T> {
         self.inner.peak()
     }