-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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 by Bors] - Dedupe move logic in remove_bundle and remove_bundle_intersection #2521
Conversation
21eceb2
to
d1cad57
Compare
while I like const generics, what's the benefit here over an additional parameter? |
I was thinking that it would mean that the branch wouldn't be there 🤔 i would hope this gets inlined and the branch to get optimized out even if this was a parameter though |
Yeah, the monomorphization would definitely help reduce the chance of branching. Whether it's worth it or not should (imo) be based on how often this function would hypothetically be called. |
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 to me! Just one nit.
bors r+ |
This logic was in both
remove_bundle
andremove_bundle_intersection
but only differed by whether we call.._forget_missing_..
or.._drop_missing_..