소스 검색

clippy: update for recent update

Jonathan Kelley 3 년 전
부모
커밋
d07e145df6
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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()
     }
     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) => {
                 if *val != *self {
                     *val = self.clone();