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 BTreeMap. #32135

Merged

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 BTreeMap 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 `BTreeMap` collection
type.

This is part of issue rust-lang#29348.
///
/// # Examples
///
/// ```
Copy link
Member

Choose a reason for hiding this comment

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

I've been putting a

/// Basic usage:

line before the first example. Since you're going to be doing a few of these, mind putting this in? If it's too much trouble, I can also do it later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not a problem at all - plan to contribute a lot more going forward, so have a whole bunch of PRs to come. Best to learn the right way to do these things now!

Fixed!

Copy link
Member

Choose a reason for hiding this comment

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

Great, I was hoping so 😄

Copy link
Member

Choose a reason for hiding this comment

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

(I think you forgot to push commits, you said it was fixed but there's no new commit)

@steveklabnik
Copy link
Member

This looks great, thank you so much! Two minor notes.

@nathankleyn
Copy link
Contributor Author

@steveklabnik Sorry, just realised I hadn't finished pushing the fixes - just done now!

@steveklabnik
Copy link
Member

It's all good! thanks so much.

steveklabnik added a commit that referenced this pull request Mar 9, 2016
Add missing documentation examples for BTreeMap.
@steveklabnik steveklabnik merged commit 996f818 into rust-lang:master Mar 9, 2016
@alexcrichton
Copy link
Member

Oh no not the merge button!

just a reminder to not use it :)

@steveklabnik
Copy link
Member

gah, this is not the new book 😦

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Mar 10, 2016
PR rust-lang#32135 was accidentally merged without tests passing, and unfortunately one
of the tests added was broken, so this fixes that.
bors added a commit that referenced this pull request Mar 10, 2016
collections: Fix broken doc example

PR #32135 was accidentally merged without tests passing, and unfortunately one
of the tests added was broken, so this fixes that.
@nathankleyn nathankleyn deleted the improve-docs-for-btreemap branch March 10, 2016 08:29
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