Skip to content

Commit 580c5f9

Browse files
use unwrap_or
1 parent da9c43a commit 580c5f9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/librustc_typeck/check/method/suggest.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,7 @@ fn is_fn_ty<'a, 'tcx>(ty: &Ty<'tcx>, fcx: &FnCtxt<'a, 'tcx>, span: Span) -> bool
8181
})
8282
});
8383

84-
match opt_is_fn {
85-
Some(result) => result,
86-
None => false,
87-
}
84+
opt_is_fn.unwrap_or(false)
8885
} else {
8986
false
9087
}

0 commit comments

Comments
 (0)