Skip to content

Commit

Permalink
Fix doc test to work without rand and from_entropy
Browse files Browse the repository at this point in the history
  • Loading branch information
vks committed Nov 27, 2023
1 parent d9a89c8 commit 1924e12
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rand_pcg/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@
//! To initialize a generator, use the [`SeedableRng`][rand_core::SeedableRng] trait:
//!
//! ```rust
//! use rand::{SeedableRng, Rng};
//! use rand_core::{SeedableRng, RngCore};
//! use rand_pcg::Pcg64Mcg;
//!
//! let mut rng = Pcg64Mcg::from_entropy();
//! let x: u32 = rng.gen();
//! let mut rng = Pcg64Mcg::seed_from_u64(0);
//! // Alternatively, you may use `Pcg64Mcg::from_entropy()`.
//! let x: u32 = rng.next_u32();
//! ```

#![doc(
Expand Down

0 comments on commit 1924e12

Please sign in to comment.