Before you can use rand, you have to tell Rust that you're using the crate by writing:
extern crate rand;
After that, rand will provide a random generator. We can access it by either calling rand::random();  or by accessing it directly with rand::thread_rng(); .
If we go the first route, the generator will need to be told what type to generate. You can either explicitly state the type in the method call  or annotate the type of the resulting variable . Both are equal and result in the exact same thing. Which one you use is up to you. In this book, we will use the first convention.
As you can see in lines [29 and 33], you need neither if the type is unambiguous in the called context.
The generated value will be ...