Hands-on Rust: treehouse or hello_yourname? (pg. 20)

In the “Prompting for the Visitor’s Name” section, contextually, the reader has just created the treehouse project. As they look for a prompt to which file to edit, they see, in the blue highlighted section,

FirstStepsWithRust/hello_yourname/src/main.rs

This appears to be a delightful convention that allows the source to be downloaded directly-- awesome!! – but the reader was in the treehouse, not hello_yourname. A small info box that explains the convention, and how to (perhaps) focus on the filename after src for their own work may be helpful.

2 Likes

Wow, I didn’t realize that the highlighted sections were links to source, that is great! It also explains what happened to cause the errata in my post. Looks like the source code changed but the book didn’t. I agree, calling this convention out more explicitly would be useful.

1 Like

Thanks for reporting the issue! I’ve put it into the issue tracker, I’ll try to clean it up for beta 3. There’s a note in the preface about source examples advancing through the chapter, but it’s not as clear as I’d like it to be - so I’ll see if I can make it more explicit in the body text. The “embed source” feature of the book builder is awesome in general, but does make it tricky when a chapter needs to work over multiple examples (I wanted to provide the reader with source for steps along the way, rather than a big dump of the final product of each chapter; the journey is more important than the destination for learning a language).

I’m not sure if the system will let me change the rendering of the source names, so it’ll probably take the form of a note that it’s advanced to the next section. (I’ll also triple-check that I intended to advance at each point).

Thanks - beta 3 will clear this up. :slight_smile:

1 Like