Programming a Guessing Game

General

By default, Rust has a set of items defined in the standard library that it brings into the scope of every program. This set is called the prelude.

If a type we want to use is not in the prelude, we have to bring that type into scope explicitly with a use command

Reference

Enum

Crate

Shadowing

let mut guess: String = String::new();
let mut guess: u32 = guess.trim().parse().expect("...");