Placate clippy

This commit is contained in:
datdenkikniet 2023-04-16 13:04:20 +02:00
parent 2db26c1015
commit 799e5bf357

View file

@ -66,8 +66,7 @@ pub unsafe fn lock<T, R>(
f: impl FnOnce(&mut T) -> R, f: impl FnOnce(&mut T) -> R,
) -> R { ) -> R {
if ceiling == (1 << nvic_prio_bits) { if ceiling == (1 << nvic_prio_bits) {
let r = critical_section::with(|_| f(&mut *ptr)); critical_section::with(|_| f(&mut *ptr))
r
} else { } else {
let current = basepri::read(); let current = basepri::read();
basepri::write(cortex_logical2hw(ceiling, nvic_prio_bits)); basepri::write(cortex_logical2hw(ceiling, nvic_prio_bits));