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

Simplify binary_heap::PeekMut struct and destructor #76334

Closed

Conversation

calebsander
Copy link
Contributor

The sift field is true unless the PeekMut is consumed by PeekMut::pop(), and it is only used to guard the destructor. This PR removes this field and uses ManuallyDrop instead to disable the destructor inside PeekMut::pop().

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @withoutboats (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 4, 2020
@Mark-Simulacrum
Copy link
Member

@bors r+

Seems reasonable, thanks!

@bors
Copy link
Contributor

bors commented Sep 4, 2020

📌 Commit 04e1612 has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 4, 2020
@LukasKalbertodt
Copy link
Member

@bors r-

This conflicts with #75974, which uses the sift flag to improve the performance significantly in some situations. I would want to pause this PR, until we decide whether or not to merge #75974. Is that ok with everyone?

Thanks @lzutao for noticing the conflict.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants