We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
interrupt::free
1 parent 2d99f9a commit a93b31fCopy full SHA for a93b31f
src/interrupt.rs
@@ -60,14 +60,14 @@ pub unsafe fn enable() {
60
#[inline]
61
pub fn free<F, R>(f: F) -> R
62
where
63
- F: FnOnce(&CriticalSection) -> R,
+ F: FnOnce(CriticalSection<'_>) -> R,
64
{
65
let primask = crate::register::primask::read();
66
67
// disable interrupts
68
disable();
69
70
- let r = f(unsafe { &CriticalSection::new() });
+ let r = f(unsafe { CriticalSection::new() });
71
72
// If the interrupts were active before our `disable` call, then re-enable
73
// them. Otherwise, keep them disabled
0 commit comments