Skip to content

Remove redundant conditional check for true and false when the boolean is right there. #30534

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

Merged
merged 1 commit into from Mar 21, 2020
Merged

Conversation

ghost
Copy link

@ghost ghost commented Mar 20, 2020

Basically, in many lines of code, there are tertiary functions that check if a statement is true, and if that statement is true, assign true to a boolean, and false if the statement is false. However, we can directly set the result of the statement to the boolean. It is much more cleaner and efficient that way.

@ghost
Copy link
Author

ghost commented Mar 20, 2020

@swift-ci please smoke test and merge

@AnthonyLatsis AnthonyLatsis requested a review from akyrtzi March 20, 2020 18:16
@ghost
Copy link
Author

ghost commented Mar 20, 2020

@akyrtzi can you please initiate the smoke-tests and merge tests?

@akyrtzi
Copy link
Contributor

akyrtzi commented Mar 20, 2020

@swift-ci smoke test and merge

1 similar comment
@akyrtzi
Copy link
Contributor

akyrtzi commented Mar 20, 2020

@swift-ci smoke test and merge

@ghost
Copy link
Author

ghost commented Mar 20, 2020

Did!

@ghost
Copy link
Author

ghost commented Mar 20, 2020

@CodaFi run the test and merge one more time please

@ghost ghost requested a review from CodaFi March 20, 2020 22:05
@CodaFi
Copy link
Contributor

CodaFi commented Mar 20, 2020

@swift-ci please smoke test

2 similar comments
@CodaFi
Copy link
Contributor

CodaFi commented Mar 20, 2020

@swift-ci please smoke test

@CodaFi
Copy link
Contributor

CodaFi commented Mar 20, 2020

@swift-ci please smoke test

@CodaFi
Copy link
Contributor

CodaFi commented Mar 21, 2020

Same here. You don’t have to rebase every time.

@swift-ci please smoke test

@CodaFi
Copy link
Contributor

CodaFi commented Mar 21, 2020

@swift-ci please smoke test

@CodaFi
Copy link
Contributor

CodaFi commented Mar 21, 2020

Oh, are you rebasing every time the Windows bot fails?

Unfortunately, that's a self-perpetuating cycle. The Windows bot currently doesn't auto-reschedule itself after you force push, so the first CI invocation after a force-push is bound to fail. Windows is not a hard gate you need to pass (yet) so don't worry about it. If the bot breaks, we'll just revert the PR and you can give it another go later.

@CodaFi
Copy link
Contributor

CodaFi commented Mar 21, 2020

Here, let's get a real run in.

@swift-ci test Windows

@CodaFi
Copy link
Contributor

CodaFi commented Mar 21, 2020

⛵️

@CodaFi CodaFi merged commit d3cade9 into swiftlang:master Mar 21, 2020
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.

3 participants