Skip to content

Commit 7fcd3d9

Browse files
authored
Merge pull request #414 from mrecachinas/osrng-impl-cryptorng
Have OsRng impl CryptoRng
2 parents ee9eced + d0b2cd1 commit 7fcd3d9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/os.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
//! generators.
1313
1414
use std::fmt;
15-
use rand_core::{RngCore, Error, impls};
15+
use rand_core::{CryptoRng, RngCore, Error, impls};
1616

1717
/// A random number generator that retrieves randomness straight from the
1818
/// operating system.
@@ -72,6 +72,8 @@ impl OsRng {
7272
}
7373
}
7474

75+
impl CryptoRng for OsRng {}
76+
7577
impl RngCore for OsRng {
7678
fn next_u32(&mut self) -> u32 {
7779
impls::next_u32_via_fill(self)

0 commit comments

Comments
 (0)