Skip to content

Commit

Permalink
Pattern match on Ok instead of Some of .ok() retval
Browse files Browse the repository at this point in the history
  • Loading branch information
est31 committed May 15, 2018
1 parent 235e7c1 commit 4d328f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/mod.rs
Expand Up @@ -3723,7 +3723,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
tcx.mk_nil()
}
hir::ExprBreak(destination, ref expr_opt) => {
if let Some(target_id) = destination.target_id.ok() {
if let Ok(target_id) = destination.target_id {
let (e_ty, cause);
if let Some(ref e) = *expr_opt {
// If this is a break with a value, we need to type-check
Expand Down

0 comments on commit 4d328f7

Please sign in to comment.