浏览代码

fix typo in signal docs

Evan Almloff 1 年之前
父节点
当前提交
92416253e0
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 2 2
      packages/signals/src/read.rs
  2. 2 2
      packages/signals/src/write.rs

+ 2 - 2
packages/signals/src/read.rs

@@ -57,14 +57,14 @@ pub trait Readable {
             .map(Self::Storage::downcast_lifetime_ref)
     }
 
-    /// Try to get a reference to the value without checking the lifetime.
+    /// Try to get a reference to the value without checking the lifetime. This will subscribe the current scope to the signal.
     ///
     /// NOTE: This method is completely safe because borrow checking is done at runtime.
     fn try_read_unchecked(
         &self,
     ) -> Result<ReadableRef<'static, Self>, generational_box::BorrowError>;
 
-    /// Tet a reference to the value without checking the lifetime.
+    /// Get a reference to the value without checking the lifetime. This will subscribe the current scope to the signal.
     ///
     /// NOTE: This method is completely safe because borrow checking is done at runtime.
     fn read_unchecked(&self) -> ReadableRef<'static, Self> {

+ 2 - 2
packages/signals/src/write.rs

@@ -42,14 +42,14 @@ pub trait Writable: Readable {
         self.try_write_unchecked().map(Self::downcast_lifetime_mut)
     }
 
-    /// Try to get a mutable reference to the value without checking the lifetime.
+    /// Try to get a mutable reference to the value without checking the lifetime. This will update any subscribers.
     ///
     /// NOTE: This method is completely safe because borrow checking is done at runtime.
     fn try_write_unchecked(
         &self,
     ) -> Result<WritableRef<'static, Self>, generational_box::BorrowMutError>;
 
-    /// Tet a mutable reference to the value without checking the lifetime.
+    /// Get a mutable reference to the value without checking the lifetime. This will update any subscribers.
     ///
     /// NOTE: This method is completely safe because borrow checking is done at runtime.
     fn write_unchecked(&self) -> WritableRef<'static, Self> {