diff options
| author | est31 <MTest31@outlook.com> | 2018-05-15 09:42:55 +0200 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2018-05-15 15:47:57 +0200 |
| commit | 4d328f786e6a927e6c11bf6e84b976a1971064cb (patch) | |
| tree | a63b9a965817ca6da6643aaecfc76bedf0ca1168 | |
| parent | 235e7c1b4312a9c5814f8b164c4b8f3d560b5777 (diff) | |
| download | rust-4d328f786e6a927e6c11bf6e84b976a1971064cb.tar.gz rust-4d328f786e6a927e6c11bf6e84b976a1971064cb.zip | |
Pattern match on Ok instead of Some of .ok() retval
| -rw-r--r-- | src/librustc_typeck/check/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 3c2e930fa65..58502bef935 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -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 |
