Skip to content

Commit 1ea98a8

Browse files
Just use Some(()) instead
1 parent 580c5f9 commit 1ea98a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc_typeck/check/method/suggest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ fn is_fn_ty<'a, 'tcx>(ty: &Ty<'tcx>, fcx: &FnCtxt<'a, 'tcx>, span: Span) -> bool
7474
let mut selcx = SelectionContext::new(infcx);
7575

7676
if selcx.evaluate_obligation(&obligation) {
77-
Some(true)
77+
Some(())
7878
} else {
7979
None
8080
}
8181
})
8282
});
8383

84-
opt_is_fn.unwrap_or(false)
84+
opt_is_fn.is_some()
8585
} else {
8686
false
8787
}

0 commit comments

Comments
 (0)