Skip to content

Commit d517eec

Browse files
Update rand crate to 0.7
and add rand_chacha and fix doc
1 parent c3fdc28 commit d517eec

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ maintenance = { status = "actively-developed" }
2828
arbitrary = "0.4"
2929

3030
[dev-dependencies]
31-
rand = "0.6"
31+
rand = "0.7"
32+
rand_chacha = "0.2"
3233

3334
[target.'cfg(fuzzing)'.dependencies]
3435
lazy_static = "1.2"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ When building with `cargo hfuzz`, the argument `--cfg fuzzing` is passed to `rus
198198

199199
```rust
200200
#[cfg(fuzzing)]
201-
let mut rng = rand::StdRng::from_seed(&[0]);
201+
let mut rng = rand_chacha::ChaCha8Rng::from_seed(&[0]);
202202
#[cfg(not(fuzzing))]
203203
let mut rng = rand::thread_rng();
204204
```

src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,11 @@
181181
//!
182182
//! ```rust
183183
//! # extern crate rand;
184-
//! # use rand::{Rng, StdRng, SeedableRng};
184+
//! # extern crate rand_chacha;
185+
//! # use rand::{Rng, SeedableRng};
185186
//! # fn main() {
186187
//! #[cfg(fuzzing)]
187-
//! let mut rng = rand::StdRng::from_seed(&[0]);
188+
//! let mut rng = rand_chacha::ChaCha8Rng::from_seed(&[0]);
188189
//! #[cfg(not(fuzzing))]
189190
//! let mut rng = rand::thread_rng();
190191
//! # }

0 commit comments

Comments
 (0)