aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rtic-monotonics/src/rp2040.rs11
-rw-r--r--rtic-monotonics/src/systick.rs11
-rw-r--r--rtic-sync/src/channel.rs19
3 files changed, 16 insertions, 25 deletions
diff --git a/rtic-monotonics/src/rp2040.rs b/rtic-monotonics/src/rp2040.rs
index f2cc7b64..6aa66ce0 100644
--- a/rtic-monotonics/src/rp2040.rs
+++ b/rtic-monotonics/src/rp2040.rs
@@ -139,8 +139,7 @@ impl embedded_hal_async::delay::DelayUs for Timer {
/// Register the Timer interrupt for the monotonic.
#[macro_export]
macro_rules! make_rp2040_monotonic_handler {
- () => {
- {
+ () => {{
#[no_mangle]
#[allow(non_snake_case)]
unsafe extern "C" fn TIMER_IRQ_0() {
@@ -149,12 +148,8 @@ macro_rules! make_rp2040_monotonic_handler {
pub struct Rp2040Token;
- unsafe impl $crate::InterruptToken<$crate::rp2040::Timer>
- for Rp2040Token
- {
- }
+ unsafe impl $crate::InterruptToken<$crate::rp2040::Timer> for Rp2040Token {}
Rp2040Token
- }
- };
+ }};
}
diff --git a/rtic-monotonics/src/systick.rs b/rtic-monotonics/src/systick.rs
index a2817832..b228e204 100644
--- a/rtic-monotonics/src/systick.rs
+++ b/rtic-monotonics/src/systick.rs
@@ -157,8 +157,7 @@ impl embedded_hal_async::delay::DelayUs for Systick {
/// Register the Systick interrupt for the monotonic.
#[macro_export]
macro_rules! make_systick_handler {
- () => {
- {
+ () => {{
#[no_mangle]
#[allow(non_snake_case)]
unsafe extern "C" fn SysTick() {
@@ -167,12 +166,8 @@ macro_rules! make_systick_handler {
pub struct SystickToken;
- unsafe impl $crate::InterruptToken<$crate::systick::Systick>
- for SystickToken
- {
- }
+ unsafe impl $crate::InterruptToken<$crate::systick::Systick> for SystickToken {}
SystickToken
- }
- };
+ }};
}
diff --git a/rtic-sync/src/channel.rs b/rtic-sync/src/channel.rs
index d0670c2d..b7b5a485 100644
--- a/rtic-sync/src/channel.rs
+++ b/rtic-sync/src/channel.rs
@@ -103,7 +103,8 @@ impl<T, const N: usize> Channel<T, N> {
#[macro_export]
macro_rules! make_channel {
($type:path, $size:expr) => {{
- static mut CHANNEL: $crate::channel::Channel<$type, $size> = $crate::channel::Channel::new();
+ static mut CHANNEL: $crate::channel::Channel<$type, $size> =
+ $crate::channel::Channel::new();
// SAFETY: This is safe as we hide the static mut from others to access it.
// Only this point is where the mutable access happens.
@@ -125,8 +126,8 @@ pub enum TrySendError<T> {
}
impl<T> core::fmt::Debug for NoReceiver<T>
- where
- T: core::fmt::Debug,
+where
+ T: core::fmt::Debug,
{
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "NoReceiver({:?})", self.0)
@@ -134,8 +135,8 @@ impl<T> core::fmt::Debug for NoReceiver<T>
}
impl<T> core::fmt::Debug for TrySendError<T>
- where
- T: core::fmt::Debug,
+where
+ T: core::fmt::Debug,
{
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
match self {
@@ -146,8 +147,8 @@ impl<T> core::fmt::Debug for TrySendError<T>
}
impl<T> PartialEq for TrySendError<T>
- where
- T: PartialEq,
+where
+ T: PartialEq,
{
fn eq(&self, other: &Self) -> bool {
match (self, other) {
@@ -301,7 +302,7 @@ impl<'a, T, const N: usize> Sender<'a, T, N> {
Poll::Pending
}
})
- .await;
+ .await;
// Make sure the link is removed from the queue.
drop(dropper);
@@ -431,7 +432,7 @@ impl<'a, T, const N: usize> Receiver<'a, T, N> {
Poll::Pending
})
- .await
+ .await
}
/// Returns true if there are no `Sender`s.