aboutsummaryrefslogtreecommitdiff
path: root/src/interrupt.rs
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <japaricious@gmail.com> 2017-03-11 23:15:39 -0500
committerGravatar Jorge Aparicio <japaricious@gmail.com> 2017-03-11 23:15:39 -0500
commit173b5bc9750909408cfcd6140ddbf8a119dc7a18 (patch)
tree1ec4ef00b3634e23e4b7d62b7fc38f2cd8820d23 /src/interrupt.rs
parent0856d2c1d5d14d17014949a1d5c0a7c25e1e5bb0 (diff)
downloadcortex-m-173b5bc9750909408cfcd6140ddbf8a119dc7a18.tar.gz
cortex-m-173b5bc9750909408cfcd6140ddbf8a119dc7a18.tar.zst
cortex-m-173b5bc9750909408cfcd6140ddbf8a119dc7a18.zip
add unsafe block
Diffstat (limited to 'src/interrupt.rs')
-rw-r--r--src/interrupt.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/interrupt.rs b/src/interrupt.rs
index 6c84301..e11fdc3 100644
--- a/src/interrupt.rs
+++ b/src/interrupt.rs
@@ -21,7 +21,10 @@ impl<T> Mutex<T> {
}
/// Mutably borrows the data for the duration of the critical section
- pub fn borrow_mut<'cs>(&self, _ctxt: &'cs mut CriticalSection) -> &'cs mut T {
+ pub fn borrow_mut<'cs>(
+ &self,
+ _ctxt: &'cs mut CriticalSection,
+ ) -> &'cs mut T {
unsafe { &mut *self.inner.get() }
}
}