aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 647f56c..2e2ce0b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -84,7 +84,10 @@ where
}
/// Mutably borrows the resource for the duration of `interrupt::free`
- pub fn cs_borrow_mut<'cs>(&self, _ctxt: &'cs mut CriticalSection) -> &'cs mut P {
+ pub fn cs_borrow_mut<'cs>(
+ &self,
+ _ctxt: &'cs mut CriticalSection,
+ ) -> &'cs mut P {
unsafe { &mut *self.peripheral.get() }
}
}
@@ -189,7 +192,10 @@ impl<T, C> Resource<T, C> {
}
/// Mutably borrows the resource for the duration of `interrupt::free`
- pub fn cs_borrow_mut<'cs>(&self, _ctxt: &'cs mut CriticalSection) -> &'cs mut T {
+ pub fn cs_borrow_mut<'cs>(
+ &self,
+ _ctxt: &'cs mut CriticalSection,
+ ) -> &'cs mut T {
unsafe { &mut *self.data.get() }
}
}