use `unwrap_or`

This commit is contained in:
Jonas Schievink 2016-04-04 14:10:03 +02:00
parent da9c43a723
commit 580c5f92d1
1 changed files with 1 additions and 4 deletions

View File

@ -81,10 +81,7 @@ fn is_fn_ty<'a, 'tcx>(ty: &Ty<'tcx>, fcx: &FnCtxt<'a, 'tcx>, span: Span) -> bool
})
});
match opt_is_fn {
Some(result) => result,
None => false,
}
opt_is_fn.unwrap_or(false)
} else {
false
}