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 f2d6210 commit 700bb26Copy full SHA for 700bb26
frameworks/Rust/axum/src/common/mod.rs
@@ -36,14 +36,14 @@ where
36
37
/// Generate a single integer in the range 1 to 10,000 (inclusive)
38
#[allow(dead_code)]
39
-#[inline]
+#[inline(always)]
40
pub fn random_id(rng: &mut SmallRng) -> i32 {
41
rng.gen_range(1..10_001)
42
}
43
44
/// Generate vector of integers in the range 1 to 10,000 (inclusive)
45
46
47
pub fn random_ids(rng: &mut SmallRng, count: usize) -> Vec<i32> {
48
rng.sample_iter(Uniform::new(1, 10_001))
49
.take(count)
0 commit comments