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

Optimize or conditions. #145

Merged
merged 1 commit into from Mar 16, 2021
Merged

Optimize or conditions. #145

merged 1 commit into from Mar 16, 2021

Conversation

lucasmichot
Copy link
Contributor

This PR optimizes or conditions.

@CoolGoose
Copy link
Contributor

@lucasmichot what's the reason for this change ?

@lucasmichot
Copy link
Contributor Author

@CoolGoose or and || do not do the same thing. Even if both their operations are a logical or, they don't have the same precedence.
The same precedence concept also applies to and and &&.

|| and && should always be used over or and and, unless there is a very good not to do.

@lucasmichot
Copy link
Contributor Author

I guess this PR can safely be merged @CoolGoose

@CoolGoose CoolGoose merged commit f4a4114 into messagebird:master Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants