Skip to content

Improving documentation. #328

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

Merged
merged 6 commits into from
May 12, 2022
Merged

Conversation

JustForFun88
Copy link
Contributor

Improved hashbrown documentation. Changed some examples so that they become full-fledged tests.

Improved hashbrown documentation. Changed some examples so that they become full-fledged tests.
@JustForFun88
Copy link
Contributor Author

JustForFun88 commented May 8, 2022

I really don't know how change try_reserve example that must return error

JustForFun88 added a commit to JustForFun88/hashbrown that referenced this pull request May 9, 2022
Copy link
Member

@Amanieu Amanieu left a comment

Choose a reason for hiding this comment

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

LGTM! One thing I noticed is that we are somewhat inconsistent in the doc headers: sometimes we use Examples and other times we use Example. It would be nice to consistently use one or the other.

Also, do you have any plans to submit these doc changes upstream to rust-lang/rust so that they appear in the standard library docs?

@JustForFun88
Copy link
Contributor Author

LGTM! One thing I noticed is that we are somewhat inconsistent in the doc headers: sometimes we use Examples and other times we use Example. It would be nice to consistently use one or the other.

Also, do you have any plans to submit these doc changes upstream to rust-lang/rust so that they appear in the standard library docs?

I think so, but it will take time. I will need to parse the existing hashbrown and std::collections::HashMap documentation.
I'll try to finish within a week.

JustForFun88 and others added 3 commits May 12, 2022 06:40
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
@JustForFun88
Copy link
Contributor Author

JustForFun88 commented May 12, 2022

Ready! Update as per your request. I also looked at the existing documentation for std::collections::HashMap and tried to get the two documentations as close to each other as possible (without considering of course my own changes). Unless I also added examples of unused Drain and DrainFilter structures.

One thing I noticed is that we are somewhat inconsistent in the doc headers: sometimes we use Examples and other times we use Example. It would be nice to consistently use one or the other.

I'll bring this up in the next pull request #331.

@Amanieu
Copy link
Member

Amanieu commented May 12, 2022

@bors r+

@bors
Copy link
Contributor

bors commented May 12, 2022

📌 Commit 5e4f858 has been approved by Amanieu

@bors
Copy link
Contributor

bors commented May 12, 2022

⌛ Testing commit 5e4f858 with merge 3b0a211...

@bors
Copy link
Contributor

bors commented May 12, 2022

☀️ Test successful - checks-actions
Approved by: Amanieu
Pushing 3b0a211 to master...

@bors bors merged commit 3b0a211 into rust-lang:master May 12, 2022
@JustForFun88 JustForFun88 deleted the update_hashbrown_doc_1 branch May 13, 2022 02:40
bors added a commit that referenced this pull request May 23, 2022
Improving documentation. Part 2.

Continuation of #328.
Close #337.
bors added a commit that referenced this pull request Jun 10, 2022
Improving documentation. Part 3.

Continuation of #328 and #331.

Also I made some changes in the previously added examples (made `compute_hash` generic and rename `compute_hash` to `make_hasher` in `insert_with_hasher example`)
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