这是indexloc提供的服务,不要输入任何密码
Skip to content

Incorrect description of String in Chapter 17.5 of rustbook #4569

@iyernaveenr

Description

@iyernaveenr
  • I have searched open and closed issues and pull requests for duplicates, using these search terms:

  • I have checked the latest main branch 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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions