Skip to content

Better introduction of &str deref coercion #2812

Open
@limuyuan

Description

@limuyuan
  • I have checked the latest main branch to see if this has already been fixed
  • I have searched existing issues and pull requests for duplicates

URL to the section(s) of the book with this problem:
https://doc.rust-lang.org/nightly/book/ch04-03-slices.html#string-slices-as-parameters
https://doc.rust-lang.org/nightly/book/ch08-02-strings.html#concatenation-with-the--operator-or-the-format-macro

Description of the problem:

So I'm thinking if there's a way to simplify these two parts, and better introduce this deref coercion feature of Rust to beginners like me.

Suggested fix:

  1. Add a reference to Chapter 4.3 on Chapter 8.2
  2. Edit the reference to Chapter 15 in Chapter 4.3, make it refer to Chapter 8.2, something like "we will discuss this later in Chapter 8 and Chapter 15"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions