diff options
author | 2019-10-29 11:19:40 +0000 | |
---|---|---|
committer | 2019-10-29 11:19:40 +0000 | |
commit | 3607c6cfd5e7c1635064efbf37939420ea0b9d84 (patch) | |
tree | 3874ddfe8d4e9552e86fb85fa8ff517e062f37bd /src/interrupt.rs | |
parent | 0e06c94fe5e4848c608e2d2b54a05d48d11055a4 (diff) | |
parent | 90c47174d15b3095964679c416962c5fe6bc3d5c (diff) | |
download | cortex-m-3607c6cfd5e7c1635064efbf37939420ea0b9d84.tar.gz cortex-m-3607c6cfd5e7c1635064efbf37939420ea0b9d84.tar.zst cortex-m-3607c6cfd5e7c1635064efbf37939420ea0b9d84.zip |
Merge #171
171: Add `#[inline]` to lots of trivial functions. r=korken89 a=m-ou-se
Now the only public non-inline functions left are:
- `write_all`
- `write_aligned`
- All (derived) `Debug` implementations
(Checked using Clippy's [`missing_inline_in_public_items`][1] lint.)
[1]: https://rust-lang.github.io/rust-clippy/master/#missing_inline_in_public_items
Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
Diffstat (limited to 'src/interrupt.rs')
-rw-r--r-- | src/interrupt.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/interrupt.rs b/src/interrupt.rs index 58f552a..2d53865 100644 --- a/src/interrupt.rs +++ b/src/interrupt.rs @@ -57,6 +57,7 @@ pub unsafe fn enable() { /// Execute closure `f` in an interrupt-free context. /// /// This as also known as a "critical section". +#[inline] pub fn free<F, R>(f: F) -> R where F: FnOnce(&CriticalSection) -> R, |