rust-lang / rust-lang/rust-by-example
incorrect comments in section "Structures"
Nobody has claimed this yet.
- Dominant language
- Handlebars
- Stars
- 8.1k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
I have searched open and closed issues and pull requests for duplicates, using these search terms:
- "another_point"
URL to the section(s) of the book with this problem:
- file:///Users/XXX/.rustup/toolchains/stable-aarch64-apple-darwin/share/doc/rust/html/rust-by-example/custom_types/structs.html
Description of the problem:
comment is not correct in Line 50, 51 for this block: Line 46-52, since bottom_right.y is updated by another_point.y, not point.y:
Suggested fix:
here the comment for println second point should be:
// bottom_right.y will be the same as another_point.y because we used that field
// from another_point
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open the Structures section at custom_types/structs.html and inspect lines 46-52, especially the comments before the second println. Update those comments so they refer to bottom_right.y being taken from another_point.y, then verify the rendered example shows the corrected explanation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100