Being new to Rust, I tend to read standard library documentation a lot. Every once in a while, I come across a passage that was not clear to me right away, and I'd like to contribute suggestions for improvements of documentation.
What is the process for this?
Hi there!
Thanks for wanting to contribute to the documentation!
Probably the best way to do this is to open either an issue or a PR on the rust GitHub page:
OK, I'll do that. Thanks for getting back to me!
Most crates out there have a github/gitlab repository (you will need an account for these sites):
-
go the project's repository website
-
fork
the project- Now you should have a "copy" of the original repository within your account
-
edit your fork as you please (
git clone your_repo
to edit from within your machine)-
For instance, in the case of the documentation, search for the docstrings:
/// This is a spuer function fn my_super_function () { ...
you change the code to fix it:
/// This is a super function fn my_super_function () { ...
-
-
If editing from within your machine,
git add -p src/changed/file.rs
, thengit commit
and finallygit push
. -
then, within the repository url, you can go and submit a PR across forks.
If the edit is small (e.g., just a minor change in a docstring), you can skip the part where you edit locally, and do the changes within your web browser:
-
Locate the Github repository
-
Edit the targeted file (by forking):
-
Make the desired changes:
-
Preview you changes and add an explicit description of your change (commit message and initial PR title):
thanks
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.