mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 20:22:51 +01:00
rustfmt
This commit is contained in:
parent
85c628c2af
commit
0ef71d29a8
1 changed files with 8 additions and 2 deletions
10
src/lib.rs
10
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() }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue