We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35b0ae3 commit dda0fe8Copy full SHA for dda0fe8
src/lib.rs
@@ -286,10 +286,7 @@ impl Rng {
286
#[inline]
287
#[must_use = "this creates a new instance of `Rng`; if you want to initialize the thread-local generator, use `fastrand::seed()` instead"]
288
pub fn with_seed(seed: u64) -> Self {
289
- let mut rng = Rng(0);
290
-
291
- rng.seed(seed);
292
- rng
+ Rng(seed)
293
}
294
295
/// Clones the generator by deterministically deriving a new generator based on the initial
0 commit comments