-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
BinaryHeap: add min-heap example #60451
Conversation
r? @TimNN (rust_highfive has picked a reviewer for you, use r? to override) |
I haven't received a code review in a week. Not sure what the official rules are, though... r? @nikomatsakis for reassignment Other issues waiting on @TimNN should be good to reassign, too: #60453 #60145 |
@steveklabnik (docs team) might be the right person? |
r? @scottmcm |
@bors r+ |
📌 Commit adbaf7a has been approved by |
BinaryHeap: add min-heap example Fixes #58174.
☀️ Test successful - checks-travis, status-appveyor |
The following are some of the PRs included here: - #92902: Improve the documentation of drain members - #87537: Clarify undefined behaviour in binary heap, btree and hashset docs - #89010: Add some intra doc links - #80681: Clarify what the effects of a 'logic error' are - #77079: Use Self in docs when possible - #75974: Avoid useless sift_down when std::collections::binary_heap::PeekMut is never mutably dereferenced - #76534: Add doc comments for From impls - #75831: doc: Prefer https link for wikipedia URLs - #74010: Use italics for O notation - #71167: big-O notation: parenthesis for function calls, explicit multiplication - #63486: Document From trait for BinaryHeap - #60952: Document BinaryHeap time complexity - #60451: BinaryHeap: add min-heap example Also port the change in rust-lang/rust@99ed06eb88 "libs: doc comments". Note that rust-lang/rust#60451 adds an example of a min-heap. We add a similar example here, although edited to highlight `binary_heap_plus::BinaryHeap`'s ability to implement a min-heap *without* wrapping the items in `std::cmp::Reverse`. Finally, we replace the wildcard import in the documentation examples with a named import of `BinaryHeap`.
Fixes #58174.