Skip to content

Definition of slices does not match the rust reference #4768

Description

@iampi31415
  • I have searched open and closed issues and pull requests for duplicates, using these search terms: All Issues.
  • I have checked the latest main branch to see if this has already been fixed, in this file: Yes.

URL to the section(s) of the book with this problem: 04-02.

Description of the problem:

Next, we’ll look at a different kind of reference: slices.

Slices are not references. Here is the reference about slices not being references (https://doc.rust-lang.org/reference/types/slice.html).

A slice is a dynamically sized type representing a ‘view’ into a sequence of elements of type T. The slice type is written as [T].

Suggested fix:

Next, we’ll look at a different type often seen behind a reference: slices.

(Add nuance: people may refer to &[T] but that's inaccurate.)
There are other mistakes that I could point out if someone reads this.

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