Skip to content
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

Don't use if-let to unwrap when it is sure that it will succeed. #138

Merged
merged 1 commit into from
Jan 20, 2016

Conversation

tcard
Copy link
Contributor

@tcard tcard commented Jan 20, 2016

Force-unwrap with ! instead. Otherwise, if the if-let fails to
unwrap the optional, it will be silently ignored. ! crashes the
program at least, so that we know that we have something wrong
in the test code.

@tcard
Copy link
Contributor Author

tcard commented Jan 20, 2016

Tests seem to be failing due to what #139 is supposed to fix.

@mattheworiordan
Copy link
Member

👍

@tcard
Copy link
Contributor Author

tcard commented Jan 20, 2016

Now tests fail because of #142, but succeed in Swift otherwise. Obj-C suite isn't run, but can't be broken by this PR. So tests can be considered to be passing.

Force-unwrap with `!` instead. Otherwise, if the if-let fails to
unwrap the optional, it will be silently ignored. `!` crashes the
program at least, so that we know that we have something wrong
in the test code.
@ricardopereira
Copy link
Contributor

LGTM

tcard added a commit that referenced this pull request Jan 20, 2016
Don't use if-let to unwrap when it is sure that it will succeed.
@tcard tcard merged commit 83b2297 into master Jan 20, 2016
@tcard tcard deleted the force-unwrap branch January 20, 2016 19:02
maratal pushed a commit that referenced this pull request Jul 19, 2023
spec: add RTS5 - create a derived channel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants