about summary refs log tree commit diff
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2018-05-15 09:42:55 +0200
committerest31 <MTest31@outlook.com>2018-05-15 15:47:57 +0200
commit4d328f786e6a927e6c11bf6e84b976a1971064cb (patch)
treea63b9a965817ca6da6643aaecfc76bedf0ca1168
parent235e7c1b4312a9c5814f8b164c4b8f3d560b5777 (diff)
downloadrust-4d328f786e6a927e6c11bf6e84b976a1971064cb.tar.gz
rust-4d328f786e6a927e6c11bf6e84b976a1971064cb.zip
Pattern match on Ok instead of Some of .ok() retval
-rw-r--r--src/librustc_typeck/check/mod.rs2
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