From 8e91b8da49551bf42ca0a50065de046afa3e43a7 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sat, 28 Jan 2023 16:33:02 +0900 Subject: [PATCH] Add #[must_use] to Rng::with_seed --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index 8254f16..4991b7f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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));