summaryrefslogtreecommitdiffstats
path: root/library/core/benches/num/int_log/mod.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
commita4b7ed7a42c716ab9f05e351f003d589124fd55d (patch)
treeb620cd3f223850b28716e474e80c58059dca5dd4 /library/core/benches/num/int_log/mod.rs
parentAdding upstream version 1.67.1+dfsg1. (diff)
downloadrustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz
rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--library/core/benches/num/int_log/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/benches/num/int_log/mod.rs b/library/core/benches/num/int_log/mod.rs
index 3c01e2998..bb61224b5 100644
--- a/library/core/benches/num/int_log/mod.rs
+++ b/library/core/benches/num/int_log/mod.rs
@@ -21,7 +21,7 @@ macro_rules! int_log_bench {
/* Exponentially distributed random numbers from the whole range of the type. */
let numbers: Vec<$t> = (0..256)
.map(|_| {
- let x = rng.gen::<$t>() >> rng.gen_range(0, <$t>::BITS);
+ let x = rng.gen::<$t>() >> rng.gen_range(0..<$t>::BITS);
if x != 0 { x } else { 1 }
})
.collect();
@@ -38,7 +38,7 @@ macro_rules! int_log_bench {
/* Exponentially distributed random numbers from the range 0..256. */
let numbers: Vec<$t> = (0..256)
.map(|_| {
- let x = (rng.gen::<u8>() >> rng.gen_range(0, u8::BITS)) as $t;
+ let x = (rng.gen::<u8>() >> rng.gen_range(0..u8::BITS)) as $t;
if x != 0 { x } else { 1 }
})
.collect();