Move to a generic GlobalLazy<T> (#2851)
* Expose a generic lazy type * Switch to generic lazy globals * simplify global lazy context a bit * rename LazyGlobal to Global * use Memo::global in more examples * Fix soundness issue with deref_impl. It relies on the size of self, so it cannot be safe * add a comment about safety * Make clippy happy * fix formatting * Restore changes to signal impl * Add helper methods for global signal and global memo to make getting the inner value easier
This commit is contained in:
1 parent
668d5415c8
commit
b47a6cf83e
13 files changed
+281
-289
No files matched your search
@@ -189,6 +189,6 @@ impl Deref for UseFuture {
|
||||
type Target = dyn Fn() -> UseFutureState;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
Readable::deref_impl(self)
|
||||
unsafe { Readable::deref_impl(self) }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user