simplify reactive context and expose less signal internals

This commit is contained in:
Evan Almloff committed 2024-02-05 08:05:27 -06:00
1 parent 8324f5290a
commit 30bac267c9
7 files changed
+53 -81

No files matched your search

+2 -2
View File
@@ -66,8 +66,8 @@ impl<T: PartialEq + 'static> Readable<T> for GlobalMemo<T> {
}
#[track_caller]
fn read(&self) -> Self::Ref<T> {
self.signal().read()
fn try_read(&self) -> Result<Self::Ref<T>, generational_box::BorrowError> {
self.signal().try_read()
}
#[track_caller]
+2 -2
View File
@@ -89,8 +89,8 @@ impl<T: 'static> Readable<T> for GlobalSignal<T> {
}
#[track_caller]
fn read(&self) -> Self::Ref<T> {
self.signal().read()
fn try_read(&self) -> Result<Self::Ref<T>, generational_box::BorrowError> {
self.signal().try_read()
}
#[track_caller]