book icon indicating copy to clipboard operation
book copied to clipboard

Better introduction of &str deref coercion

Open limuyuan opened this issue 4 years ago • 1 comments

  • [x] I have checked the latest main branch to see if this has already been fixed
  • [x] 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"

limuyuan avatar Aug 04 '21 03:08 limuyuan

One more reason, reference to ch15 when reading ch04 might be quite frustrating. The reader will have to read 11 more chapters to figure it out. Make a closer reference to ch08 would reduce this frustration.

limuyuan avatar Aug 04 '21 03:08 limuyuan