Skip to content

Commit 700bb26

Browse files
perf: increase strength of inlining hint
1 parent f2d6210 commit 700bb26

File tree

1 file changed

+2
-2
lines changed
  • frameworks/Rust/axum/src/common

1 file changed

+2
-2
lines changed

frameworks/Rust/axum/src/common/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ where
3636

3737
/// Generate a single integer in the range 1 to 10,000 (inclusive)
3838
#[allow(dead_code)]
39-
#[inline]
39+
#[inline(always)]
4040
pub fn random_id(rng: &mut SmallRng) -> i32 {
4141
rng.gen_range(1..10_001)
4242
}
4343

4444
/// Generate vector of integers in the range 1 to 10,000 (inclusive)
4545
#[allow(dead_code)]
46-
#[inline]
46+
#[inline(always)]
4747
pub fn random_ids(rng: &mut SmallRng, count: usize) -> Vec<i32> {
4848
rng.sample_iter(Uniform::new(1, 10_001))
4949
.take(count)

0 commit comments

Comments
 (0)