From 9c9ab90da3e0f0933e08a173caff318b0613b1ad Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Sat, 11 Jan 2020 11:49:52 +0100 Subject: [PATCH] feature gate random --- src/utils.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils.rs b/src/utils.rs index c5ec0ce..cb831da 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -19,6 +19,7 @@ pub fn abort_on_panic(f: impl FnOnce() -> T) -> T { } /// Generates a random number in `0..n`. +#[cfg(feature = "unstable")] pub fn random(n: u32) -> u32 { use std::cell::Cell; use std::num::Wrapping;