-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Refactored code to remove unnecessary checks #2425
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
Conversation
@swift-ci please test linux |
@swift-ci please test |
Fixed the mistake. Everything should be good! |
@swift-ci please test linux |
cc @gregomni |
@pi1024e Could you please squash this into one commit? |
@swift-ci Please test Linux |
@swift-ci Please test linux |
1 similar comment
@swift-ci Please test linux |
Made those changes! |
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.
@pi1024e: instead of a lot of small changes, why don't we focus in the original change. I don't think anyone has any problem with the code as it is now, and we can figure out the other changes one by one.
Can you maybe rewrite this patch to only be those changes, squash, and then submit the other changes in different PRs?
Thanks.
Made those changes. Thank you! |
Fixed! |
@pi1024e: I don't know what your expertise level is, but I'm going to explain this as best as I can. The only commit that we are currently interested is the first one, and also the fix from the first feedback. It seems that you are using the
That should get us only the initial changes, clean of every other commit. All your other changes are in a local branch called Thanks! |
Thank you so much! Now I know what to do and how to properly contribute. Thank you! |
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.
Almost. You should try to follow @drodriguez’s instructions as exactly as possible; you’re still introducing new whitespace changes with every commit, possibly unintentionally.
Clang-format automatically made the whitespace changes. I thought I had to run that before committing to ensure no formatting changes would be done. Guess I was wrong. |
It can be helpful to clang-format your own contributions, but you should not format existing code. There are now pervasive changes in whitespace which cannot be taken as part of this PR. Again, please try to follow @drodriguez’s instructions as exactly as possible and make no other changes. |
Everything is fixed! |
This looks good. As the final step, please squash your commits into one commit. Here is a tutorial that explains how: |
Squashed those commits! |
@swift-ci test |
Are these changes ok? |
This looks good to me, but others still have to approve. |
@swift-ci Please test |
@swift-ci please test |
Fixed! |
Good, now if you squash the commit, this PR looks to be in better shape. |
Fixed! |
@swift-ci please test |
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.
I don't know what happened, but you've introduced additional changes again?
Done! |
Okay. All changes done! Let us get this over with! |
@swift-ci Please test |
You need permissions to trigger testing. It's helpful if you've made sure that your changes compile and pass all tests locally. @swift-ci Please test |
@swift-ci Please test |
@swift-ci Please test Linux |
When creating an immutable funnel, the code checks the value of "hasLengthByte" twice if it ends up being true. Checking for it once is all that is needed, as another branch can check for the other boolean statement in the if statement previously on line 1483. Differentiating the branches allows less redundant checks and does not introduce any side effects.