-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Add missing documentation examples for BTreeMap. #32135
Conversation
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 | ||
/// | ||
/// ``` |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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 😄
There was a problem hiding this comment.
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)
This looks great, thank you so much! Two minor notes. |
@steveklabnik Sorry, just realised I hadn't finished pushing the fixes - just done now! |
It's all good! thanks so much. |
Add missing documentation examples for BTreeMap.
Oh no not the merge button! just a reminder to not use it :) |
gah, this is not the new book 😦 |
PR rust-lang#32135 was accidentally merged without tests passing, and unfortunately one of the tests added was broken, so this fixes that.
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.
As part of the ongoing effort to document all methods with examples,
this commit adds the missing examples for the
BTreeMap
collectiontype.
This is part of issue #29348.
r? @steveklabnik