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

BinaryHeap: add min-heap example #60451

Merged
merged 1 commit into from
May 10, 2019
Merged

Conversation

rasendubi
Copy link
Contributor

Fixes #58174.

@rust-highfive
Copy link
Collaborator

r? @TimNN

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 1, 2019
@jonas-schievink jonas-schievink added the A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools label May 1, 2019
@rasendubi
Copy link
Contributor Author

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

@rust-highfive rust-highfive assigned nikomatsakis and unassigned TimNN May 8, 2019
@mark-i-m
Copy link
Member

mark-i-m commented May 9, 2019

@steveklabnik (docs team) might be the right person?

@Centril
Copy link
Contributor

Centril commented May 10, 2019

r? @scottmcm

@scottmcm
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented May 10, 2019

📌 Commit adbaf7a has been approved by scottmcm

@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 May 10, 2019
@bors
Copy link
Contributor

bors commented May 10, 2019

⌛ Testing commit adbaf7a with merge 407536e...

bors added a commit that referenced this pull request May 10, 2019
@bors
Copy link
Contributor

bors commented May 10, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: scottmcm
Pushing 407536e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 10, 2019
@bors bors merged commit adbaf7a into rust-lang:master May 10, 2019
clint-white added a commit to clint-white/binary-heap-plus-rs that referenced this pull request Aug 7, 2022
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`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BinaryHeap example should show how to make a min-heap.
9 participants