Hello,
The problem:
println!("{:?}",rand::thread_rng());
The question :
It displays this – ThreadRng { rng: UnsafeCell { .. } }
– in the cmd, therefore, what would be the meaning of UnsafeCell ? Shouldn't is be displaying random numbers ?
Thanks for the help
Other related question:
Is it possible to write this:
let secret_number = rand::thread_rng().gen_range(1..=100);
like this:
let secret_number = rand::thread_rng(gen_range(1..=100));
?
Thanks and have a good day
1 post - 1 participant
Source: View source