Skip to content

The book should state _why_ ownership is not wanted in the example  #3961

@spotlesscoder

Description

@spotlesscoder

URL to the section(s) of the book with this problem:
https://doc.rust-lang.org/book/ch04-03-slices.html

Description of the problem:
After the first code block, the following text is written:

The first_word function has a &String as a parameter. We don’t want ownership, so this is fine.

I don't understand why in that case ownership is not required / wanted

Suggested fix:
Add a short explanation

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