Skip to content

Commit d8a63a1

Browse files
committed
Implement CryptoRng for ThreadRng
1 parent 6c666be commit d8a63a1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/thread_rng.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use std::cell::RefCell;
1414
use std::rc::Rc;
1515

16-
use {RngCore, StdRng, SeedableRng, EntropyRng};
16+
use {RngCore, CryptoRng, StdRng, SeedableRng, EntropyRng};
1717
use {Distribution, Uniform, Rng, Error};
1818
use reseeding::ReseedingRng;
1919

@@ -97,6 +97,8 @@ impl RngCore for ThreadRng {
9797
}
9898
}
9999

100+
impl CryptoRng for ThreadRng {}
101+
100102
/// Generates a random value using the thread-local random number generator.
101103
///
102104
/// This is simply a shortcut for `thread_rng().gen()`. See [`thread_rng`] for

0 commit comments

Comments
 (0)