Skip to content

Commit a93b31f

Browse files
committed
Fix interrupt::free.
1 parent 2d99f9a commit a93b31f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/interrupt.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ pub unsafe fn enable() {
6060
#[inline]
6161
pub fn free<F, R>(f: F) -> R
6262
where
63-
F: FnOnce(&CriticalSection) -> R,
63+
F: FnOnce(CriticalSection<'_>) -> R,
6464
{
6565
let primask = crate::register::primask::read();
6666

6767
// disable interrupts
6868
disable();
6969

70-
let r = f(unsafe { &CriticalSection::new() });
70+
let r = f(unsafe { CriticalSection::new() });
7171

7272
// If the interrupts were active before our `disable` call, then re-enable
7373
// them. Otherwise, keep them disabled

0 commit comments

Comments
 (0)