Skip to content

Commit 84f108d

Browse files
committed
refactor(core/game_loop): remove unneeded mut's
1 parent ce2f92f commit 84f108d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/game_loop.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
use std::time::{Duration, Instant};
22

33
pub fn game_loop<T: FnMut(), F: FnMut(f32)>(ticks_per_second: &f32, mut tick: T, mut frame: F) {
4-
let mut time_step = 1.0 / ticks_per_second;
4+
let time_step = 1.0 / ticks_per_second;
55
let mut delta_time = 0.0;
66
let mut accumulator = 0.0;
77

88
let mut last_time = Instant::now();
99

1010
loop {
11-
let mut current_time = Instant::now();
11+
let current_time = Instant::now();
1212
delta_time = (current_time - last_time).as_secs_f32();
1313
last_time = current_time;
1414
accumulator += delta_time;

0 commit comments

Comments
 (0)