diff options
author | 2017-03-11 23:15:39 -0500 | |
---|---|---|
committer | 2017-03-11 23:15:39 -0500 | |
commit | 173b5bc9750909408cfcd6140ddbf8a119dc7a18 (patch) | |
tree | 1ec4ef00b3634e23e4b7d62b7fc38f2cd8820d23 /src/interrupt.rs | |
parent | 0856d2c1d5d14d17014949a1d5c0a7c25e1e5bb0 (diff) | |
download | cortex-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.rs | 5 |
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() } } } |