Skip to content

Commit

Permalink
Add #[must_use] to Rng::with_seed
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Feb 1, 2023
1 parent fba4491 commit 8e91b8d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ impl Rng {

/// Creates a new random number generator with the initial seed.
#[inline]
#[must_use = "this creates a new instance of `Rng`; if you want to initialize the thread-local generator, use `fastrand::seed()` instead"]
pub fn with_seed(seed: u64) -> Self {
let rng = Rng(Cell::new(0));

Expand Down

0 comments on commit 8e91b8d

Please sign in to comment.