Hands-on Rust: variable used before declaration (page 22)

The instruction:
Add the following code to your main function, immediately after the println!:

Makes your_name be used before the declaration:
let mut your_name = String::new();

Great book, enjoying it a lot so far! :slight_smile:

2 Likes

Thank you! I’ll put that into my issue tracker and include the fix in beta 2.

2 Likes