Just use Some(()) instead

This commit is contained in:
Jonas Schievink 2016-04-04 15:08:38 +02:00
parent 580c5f92d1
commit 1ea98a8b70

View File

@ -74,14 +74,14 @@ fn is_fn_ty<'a, 'tcx>(ty: &Ty<'tcx>, fcx: &FnCtxt<'a, 'tcx>, span: Span) -> bool
let mut selcx = SelectionContext::new(infcx);
if selcx.evaluate_obligation(&obligation) {
Some(true)
Some(())
} else {
None
}
})
});
opt_is_fn.unwrap_or(false)
opt_is_fn.is_some()
} else {
false
}