Skip to content

Commit 4d328f7

Browse files
committed
Pattern match on Ok instead of Some of .ok() retval
1 parent 235e7c1 commit 4d328f7

File tree

1 file changed

+1
-1
lines changed
  • src/librustc_typeck/check

1 file changed

+1
-1
lines changed

src/librustc_typeck/check/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3723,7 +3723,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
37233723
tcx.mk_nil()
37243724
}
37253725
hir::ExprBreak(destination, ref expr_opt) => {
3726-
if let Some(target_id) = destination.target_id.ok() {
3726+
if let Ok(target_id) = destination.target_id {
37273727
let (e_ty, cause);
37283728
if let Some(ref e) = *expr_opt {
37293729
// If this is a break with a value, we need to type-check

0 commit comments

Comments
 (0)