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

Add missing documentation examples for BinaryHeap. #32137

Merged
merged 3 commits into from
Mar 12, 2016

Conversation

nathankleyn
Copy link
Contributor

As part of the ongoing effort to document all methods with examples,
this commit adds the missing examples for the BinaryHeap collection
type.

This is part of issue #29348.

r? @steveklabnik

As part of the ongoing effort to document all methods with examples,
this commit adds the missing examples for the `BinaryHeap` collection
type.

This is part of issue rust-lang#29348.
@@ -331,6 +374,17 @@ impl<T: Ord> BinaryHeap<T> {
}

/// Discards as much additional capacity as possible.
///
/// # Examples
///
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment about basic usage from the other PR here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

@steveklabnik
Copy link
Member

@bors: r+ rollup

Thanks so much!

@bors
Copy link
Contributor

bors commented Mar 9, 2016

📌 Commit 04436fb has been approved by steveklabnik

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Mar 10, 2016
…heap, r=steveklabnik

Add missing documentation examples for BinaryHeap.

As part of the ongoing effort to document all methods with examples,
this commit adds the missing examples for the `BinaryHeap` collection
type.

This is part of issue rust-lang#29348.

r? @steveklabnik
@steveklabnik
Copy link
Member

@bors: r-

the travis failure here is legit, there's an extra mut.

@nathankleyn
Copy link
Contributor Author

@steveklabnik Fixed!

On a related note, what is your workflow for running these tests quickly and easily as you make doc changes? Now that I'm trying to get more involved and doing more, I'd really like to understand a bit more about how you work on a day-to-day basis, especially so I can avoid silly mistakes like this! 😀

@steveklabnik
Copy link
Member

I usually do rustdoc --test path/to/crate, which isn't too bad. It can be a bit long for a big crate like std, but it's still better than building everything.

So in this case, rustdoc --test src/libcollections/lib.rs.

@nathankleyn
Copy link
Contributor Author

@steveklabnik Ah that's awesome, thanks heaps for your help and patience! PR is ready for you and tests are green again. I'll now keep ^^ these tests running on a watch as I get through the other tasks from #29348.

@steveklabnik
Copy link
Member

@bors: r+ rollup

Great! :) Also, there's a #rust-docs on IRC if you want to chat in realtime about issues relating to docs.

@bors
Copy link
Contributor

bors commented Mar 11, 2016

📌 Commit da4fda4 has been approved by steveklabnik

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Mar 11, 2016
…heap, r=steveklabnik

Add missing documentation examples for BinaryHeap.

As part of the ongoing effort to document all methods with examples,
this commit adds the missing examples for the `BinaryHeap` collection
type.

This is part of issue rust-lang#29348.

r? @steveklabnik
Manishearth added a commit to Manishearth/rust that referenced this pull request Mar 11, 2016
…heap, r=steveklabnik

Add missing documentation examples for BinaryHeap.

As part of the ongoing effort to document all methods with examples,
this commit adds the missing examples for the `BinaryHeap` collection
type.

This is part of issue rust-lang#29348.

r? @steveklabnik
bors added a commit that referenced this pull request Mar 12, 2016
Rollup of 11 pull requests

- Successful merges: #32137, #32158, #32171, #32174, #32178, #32179, #32180, #32181, #32183, #32186, #32197
- Failed merges:
@bors bors merged commit da4fda4 into rust-lang:master Mar 12, 2016
@nathankleyn nathankleyn deleted the improve-docs-for-binaryheap branch March 12, 2016 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants