diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2017-04-02 20:38:45 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2017-04-02 20:38:45 -0500 |
| commit | 0ef71d29a857118e2f6742389793beb3f63266b2 (patch) | |
| tree | d0a8711bc2c83af7fac077fef9bd8586ed216b67 /src | |
| parent | 85c628c2af6974ee7b13777f920ce54654d98f63 (diff) | |
rustfmt
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib.rs | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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() } } } |
