change to using iter

This commit is contained in:
Corwin Kuiper 2021-06-25 21:40:25 +01:00
parent 1ac33bfbc8
commit 8b8b2b17a2

View file

@ -94,9 +94,8 @@ static mut INTERRUPT_TABLE: [InterruptRoot; 14] = [
#[no_mangle]
pub extern "C" fn __RUST_INTERRUPT_HANDLER(interrupt: u16) {
for i in 0..=13_u16 {
for (i, root) in unsafe { INTERRUPT_TABLE.iter().enumerate() } {
if (1 << i) & interrupt != 0 {
let root = unsafe { &INTERRUPT_TABLE[i as usize] };
root.trigger_interrupts();
}
}