rust-lang / book

The Rust Programming Language
https://doc.rust-lang.org/book/
Other
15.12k stars 3.4k forks source link

Chapter 7, Page 132 - Bringing Paths into Scope with the use Keyword #3644

Open alamba78 opened 1 year ago

alamba78 commented 1 year ago

The first paragraph mentions, "Having to write out the paths to call functions can feel inconvenient and repetitive. In Listing 7-7, whether we chose the absolute or relative path to the add_to_waitlist function, every time we wanted to call add_to_waitlist we had to specify front_of_house and hosting too."

The Listing 7-7 here should actually be Listing 7-3, where we used the absolute and relative paths (Page 125-126).

This only requires correction in the printed book as Listing 7-7 in the online book shows the full code where absolute and relative paths are shown. In the printed book, Listing 7-7 is truncated with --snip-- where we don't see the absolute and relative path code.

chriskrycho commented 6 months ago

Thanks for filing this! I have flagged it for the print revision for the 2024 edition!