فهرست منبع

Fix peek spelling

Evan Almloff 1 سال پیش
والد
کامیت
a1550460ce
1فایلهای تغییر یافته به همراه5 افزوده شده و 5 حذف شده
  1. 5 5
      packages/signals/src/signal.rs

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

@@ -203,7 +203,7 @@ impl<T: 'static> Signal<T> {
         self.inner.origin_scope()
         self.inner.origin_scope()
     }
     }
 
 
-    /// Get the current value of the signal. This will subscribe the current scope to the signal.  If you would like to read the signal without subscribing to it, you can use [`Self::peak`] instead.
+    /// Get the current value of the signal. This will subscribe the current scope to the signal.  If you would like to read the signal without subscribing to it, you can use [`Self::peek`] instead.
     ///
     ///
     /// If the signal has been dropped, this will panic.
     /// If the signal has been dropped, this will panic.
     #[track_caller]
     #[track_caller]
@@ -237,7 +237,7 @@ 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.**
     /// 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.
     /// If the signal has been dropped, this will panic.
-    pub fn peak(&self) -> GenerationalRef<T> {
+    pub fn peek(&self) -> GenerationalRef<T> {
         let inner = self.inner.read();
         let inner = self.inner.read();
         GenerationalRef::map(inner, |v| &v.value)
         GenerationalRef::map(inner, |v| &v.value)
     }
     }
@@ -428,7 +428,7 @@ impl<T: 'static> ReadOnlySignal<T> {
         self.inner.origin_scope()
         self.inner.origin_scope()
     }
     }
 
 
-    /// Get the current value of the signal. This will subscribe the current scope to the signal. If you would like to read the signal without subscribing to it, you can use [`Self::peak`] instead.
+    /// Get the current value of the signal. This will subscribe the current scope to the signal. If you would like to read the signal without subscribing to it, you can use [`Self::peek`] instead.
     ///
     ///
     /// If the signal has been dropped, this will panic.
     /// If the signal has been dropped, this will panic.
     #[track_caller]
     #[track_caller]
@@ -439,8 +439,8 @@ 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.**
     /// 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.
     /// If the signal has been dropped, this will panic.
-    pub fn peak(&self) -> GenerationalRef<T> {
-        self.inner.peak()
+    pub fn peek(&self) -> GenerationalRef<T> {
+        self.inner.peek()
     }
     }
 
 
     /// Run a closure with a reference to the signal's value.
     /// Run a closure with a reference to the signal's value.