mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 20:22:51 +01:00
Placate clippy
This commit is contained in:
parent
2db26c1015
commit
799e5bf357
1 changed files with 1 additions and 2 deletions
|
@ -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));
|
||||||
|
|
Loading…
Reference in a new issue