From 799e5bf35786de703bf835912f74b92d358dbde0 Mon Sep 17 00:00:00 2001 From: datdenkikniet Date: Sun, 16 Apr 2023 13:04:20 +0200 Subject: [PATCH] Placate clippy --- rtic/src/export/cortex_basepri.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rtic/src/export/cortex_basepri.rs b/rtic/src/export/cortex_basepri.rs index d3ceba35ba..695236be3a 100644 --- a/rtic/src/export/cortex_basepri.rs +++ b/rtic/src/export/cortex_basepri.rs @@ -66,8 +66,7 @@ pub unsafe fn lock( f: impl FnOnce(&mut T) -> R, ) -> R { if ceiling == (1 << nvic_prio_bits) { - let r = critical_section::with(|_| f(&mut *ptr)); - r + critical_section::with(|_| f(&mut *ptr)) } else { let current = basepri::read(); basepri::write(cortex_logical2hw(ceiling, nvic_prio_bits));