-
-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make missing break labels not panic #1859
Conversation
2802b98
to
c1ce48e
Compare
c1ce48e
to
9a274d9
Compare
Codecov Report
@@ Coverage Diff @@
## main #1859 +/- ##
==========================================
- Coverage 56.29% 56.29% -0.01%
==========================================
Files 201 201
Lines 17936 17937 +1
==========================================
Hits 10097 10097
- Misses 7839 7840 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks! I would just recommend a small change in the test, for readability.
break nonexistent; | ||
} | ||
"#; | ||
|
||
let _ = &exec(src); | ||
assert!(matches!(Context::default().eval(src.as_bytes()), Err(_))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be changed to assert!(Context::default().eval(&src).is_err())
?
It seems simpler :)
This has been fixed by #1874 , so closing this. |
This PR changes the following: