auto merge of #14816 : theptrk/rust/unclear-comment, r=huonw
The old comment left it unclear if this is creating a random value or doing a check as to whether or not the generator is available or some other operation. See: http://stackoverflow.com/questions/24153311/when-is-rng-gen-not-true
This commit is contained in:
commit
7c7f4b0e0b
|
@ -60,7 +60,7 @@ use std::rand;
|
||||||
use std::rand::Rng;
|
use std::rand::Rng;
|
||||||
|
|
||||||
let mut rng = rand::task_rng();
|
let mut rng = rand::task_rng();
|
||||||
if rng.gen() { // bool
|
if rng.gen() { // random bool
|
||||||
println!("int: {}, uint: {}", rng.gen::<int>(), rng.gen::<uint>())
|
println!("int: {}, uint: {}", rng.gen::<int>(), rng.gen::<uint>())
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue