fix: correct typecast on `Memo::get_untracked` (closes issue #754) (#755)

This commit is contained in:
Greg Johnston 2023-03-27 11:28:40 -04:00 committed by GitHub
parent 97d88c65ae
commit a94711fcf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -191,7 +191,8 @@ impl<T: Clone> SignalGetUntracked<T> for Memo<T> {
)]
fn get_untracked(&self) -> T {
with_runtime(self.runtime, move |runtime| {
match self.id.try_with_no_subscription(runtime, T::clone) {
let f = move |maybe_value: &Option<T>| maybe_value.clone().unwrap();
match self.id.try_with_no_subscription(runtime, f) {
Ok(t) => t,
Err(_) => panic_getting_dead_memo(
#[cfg(debug_assertions)]