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 3ee89aa commit 0aa11a3Copy full SHA for 0aa11a3
src/timer.rs
@@ -152,11 +152,13 @@ impl<T> Timer<T> {
152
let num_slots = num_slots.next_power_of_two();
153
let capacity = capacity.next_power_of_two();
154
let mask = (num_slots as u64) - 1;
155
- let wheel = iter::repeat(WheelEntry {
156
- next_tick: TICK_MAX,
157
- head: EMPTY,
158
- })
159
- .take(num_slots)
+ let wheel = iter::repeat_n(
+ WheelEntry {
+ next_tick: TICK_MAX,
+ head: EMPTY,
+ },
160
+ num_slots,
161
+ )
162
.collect();
163
164
Timer {
0 commit comments