more fixes
All checks were successful
Deploy Website / deploy (push) Has been skipped

This commit is contained in:
2026-03-01 03:33:22 +01:00
parent b72c782b2b
commit 11cc925faf
24 changed files with 269 additions and 189 deletions

View File

@@ -85,7 +85,7 @@ pub fn dispatcher_loop(
let current_us = link.clock_micros() as SyncTime;
while let Some(cmd) = queue.peek() {
if cmd.target_time_us <= current_us + SPIN_THRESHOLD_US {
let cmd = queue.pop().unwrap();
let cmd = queue.pop().expect("pop after peek");
wait_until_dispatch(cmd.target_time_us, &link, has_rt);
dispatch_midi(cmd.command, &midi_tx);
} else {
@@ -149,8 +149,8 @@ mod tests {
target_time_us: 200,
});
assert_eq!(heap.pop().unwrap().target_time_us, 100);
assert_eq!(heap.pop().unwrap().target_time_us, 200);
assert_eq!(heap.pop().unwrap().target_time_us, 300);
assert_eq!(heap.pop().expect("heap non-empty").target_time_us, 100);
assert_eq!(heap.pop().expect("heap non-empty").target_time_us, 200);
assert_eq!(heap.pop().expect("heap non-empty").target_time_us, 300);
}
}