aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2017-04-02 20:38:45 -0500
committerJorge Aparicio <japaricious@gmail.com>2017-04-02 20:38:45 -0500
commit0ef71d29a857118e2f6742389793beb3f63266b2 (patch)
treed0a8711bc2c83af7fac077fef9bd8586ed216b67 /src/lib.rs
parent85c628c2af6974ee7b13777f920ce54654d98f63 (diff)
rustfmt
Diffstat (limited to 'src/lib.rs')
-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() }
}
}