Skip to content

Commit 89be0f4

Browse files
committed
cargo clippy --fix
1 parent c4f05d2 commit 89be0f4

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

riscv-rt/src/lib.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -472,17 +472,15 @@ pub extern "C" fn start_trap_rust(trap_frame: *const TrapFrame) {
472472

473473
if cause.is_exception() {
474474
ExceptionHandler(&*trap_frame)
475-
} else {
476-
if cause.code() < __INTERRUPTS.len() {
477-
let h = &__INTERRUPTS[cause.code()];
478-
if h.reserved == 0 {
479-
DefaultHandler();
480-
} else {
481-
(h.handler)();
482-
}
483-
} else {
475+
} else if cause.code() < __INTERRUPTS.len() {
476+
let h = &__INTERRUPTS[cause.code()];
477+
if h.reserved == 0 {
484478
DefaultHandler();
479+
} else {
480+
(h.handler)();
485481
}
482+
} else {
483+
DefaultHandler();
486484
}
487485
}
488486
}

0 commit comments

Comments
 (0)