Incorrect description of String in Chapter 17.5 of rustbook
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 18.3k
- Forks
- 4.1k
- Avg merge
- 14m
- Merged PRs (30d)
- 1
Description
-
I have searched open and closed issues and pull requests for duplicates, using these search terms:
-
I have checked the latest
mainbranch to see if this has already been fixed, in this file:
URL to the section(s) of the book with this problem:
https://doc.rust-lang.org/book/ch17-05-traits-for-async.html#the-pin-and-unpin-traits
Description of the problem:
Quoting chapter 17.5 from rustbook, section "Pin and Unpin Traits":
"
To make that concrete, think about a String: it has a length and the Unicode characters that make it up.
"
A String consitutes of len, capacity and a pointer to unicode characters. On the other hand, a string slice &str constitutes of pointer and len.
Suggested fix:
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 linked Chapter 17.5 section on the Pin and Unpin Traits and locate its source in the book repository. Check the quoted description against Rust's String and &str representations, then update the wording and verify the rendered section accurately describes both types.
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
- Mostly clear
- Newbie friendliness
- 55/100