From 5a8ff70f854c0d6fef3e5b7be12b750aab37b9f2 Mon Sep 17 00:00:00 2001 From: datdenkikniet Date: Thu, 3 Apr 2025 20:36:36 +0200 Subject: [PATCH] Placate clippy --- rtic-macros/src/lib.rs | 2 +- rtic-monotonics/src/imxrt.rs | 8 ++++---- rtic-monotonics/src/systick.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rtic-macros/src/lib.rs b/rtic-macros/src/lib.rs index c464ab04812..ff32f24dcaa 100644 --- a/rtic-macros/src/lib.rs +++ b/rtic-macros/src/lib.rs @@ -88,7 +88,7 @@ with_backend! { // // If no "target" directory is found, / is used for path in out_dir.ancestors() { - if let Some(dir) = path.components().last() { + if let Some(dir) = path.components().next_back() { let dir = dir.as_os_str().to_str().unwrap(); if dir.starts_with("thumbv") || dir.starts_with("riscv") { diff --git a/rtic-monotonics/src/imxrt.rs b/rtic-monotonics/src/imxrt.rs index f413d5c4c26..d59e91e74a9 100644 --- a/rtic-monotonics/src/imxrt.rs +++ b/rtic-monotonics/src/imxrt.rs @@ -103,8 +103,8 @@ macro_rules! __internal_create_imxrt_timer_struct { /// /// * `name` - The name that the monotonic type will have. /// * `tick_rate_hz` - The tick rate of the timer peripheral. It's the user's responsibility -/// to configure the peripheral to the given frequency before starting the -/// monotonic. +/// to configure the peripheral to the given frequency before starting the +/// monotonic. #[cfg(feature = "imxrt_gpt1")] #[macro_export] macro_rules! imxrt_gpt1_monotonic { @@ -121,8 +121,8 @@ macro_rules! imxrt_gpt1_monotonic { /// /// * `name` - The name that the monotonic type will have. /// * `tick_rate_hz` - The tick rate of the timer peripheral. It's the user's responsibility -/// to configure the peripheral to the given frequency before starting the -/// monotonic. +/// to configure the peripheral to the given frequency before starting the +/// monotonic. #[cfg(feature = "imxrt_gpt2")] #[macro_export] macro_rules! imxrt_gpt2_monotonic { diff --git a/rtic-monotonics/src/systick.rs b/rtic-monotonics/src/systick.rs index 48888be3e66..024c9ad7bb6 100644 --- a/rtic-monotonics/src/systick.rs +++ b/rtic-monotonics/src/systick.rs @@ -140,7 +140,7 @@ impl TimerQueueBackend for SystickBackend { /// /// * `name` - The name that the monotonic type will have. /// * `tick_rate_hz` - The tick rate of the timer peripheral. -/// Can be omitted; defaults to 1kHz. +/// Can be omitted; defaults to 1kHz. #[macro_export] macro_rules! systick_monotonic { ($name:ident) => {