diff --git a/packages/hooks/src/usefuture.rs b/packages/hooks/src/usefuture.rs index 1af254843..c7bdd819b 100644 --- a/packages/hooks/src/usefuture.rs +++ b/packages/hooks/src/usefuture.rs @@ -152,7 +152,7 @@ impl UseFutureDep for &A { (*self).clone() } fn apply(self, state: &mut Vec>) -> bool { - match state.get_mut(0).map(|f| f.downcast_mut::()).flatten() { + match state.get_mut(0).and_then(|f| f.downcast_mut::()) { Some(val) => { if *val != *self { *val = self.clone();