Skip to content

Commit 8e91b8d

Browse files
committed
Add #[must_use] to Rng::with_seed
1 parent fba4491 commit 8e91b8d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ impl Rng {
282282

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

0 commit comments

Comments
 (0)