Browse Source

clippy: update for recent update

Jonathan Kelley 3 years ago
parent
commit
d07e145df6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/hooks/src/usefuture.rs

+ 1 - 1
packages/hooks/src/usefuture.rs

@@ -152,7 +152,7 @@ impl<A: Dep> UseFutureDep for &A {
         (*self).clone()
         (*self).clone()
     }
     }
     fn apply(self, state: &mut Vec<Box<dyn Any>>) -> bool {
     fn apply(self, state: &mut Vec<Box<dyn Any>>) -> bool {
-        match state.get_mut(0).map(|f| f.downcast_mut::<A>()).flatten() {
+        match state.get_mut(0).and_then(|f| f.downcast_mut::<A>()) {
             Some(val) => {
             Some(val) => {
                 if *val != *self {
                 if *val != *self {
                     *val = self.clone();
                     *val = self.clone();