diff options
Diffstat (limited to 'rand/examples/monty-hall.rs')
-rw-r--r-- | rand/examples/monty-hall.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/rand/examples/monty-hall.rs b/rand/examples/monty-hall.rs index 0932c5e..9fe5839 100644 --- a/rand/examples/monty-hall.rs +++ b/rand/examples/monty-hall.rs @@ -26,13 +26,10 @@ //! //! [Monty Hall Problem]: https://en.wikipedia.org/wiki/Monty_Hall_problem -#![cfg(feature="std")] +#![cfg(feature = "std")] - -extern crate rand; - -use rand::Rng; use rand::distributions::{Distribution, Uniform}; +use rand::Rng; struct SimulationResult { win: bool, @@ -40,8 +37,7 @@ struct SimulationResult { } // Run a single simulation of the Monty Hall problem. -fn simulate<R: Rng>(random_door: &Uniform<u32>, rng: &mut R) - -> SimulationResult { +fn simulate<R: Rng>(random_door: &Uniform<u32>, rng: &mut R) -> SimulationResult { let car = random_door.sample(rng); // This is our initial choice |