From 78f5269dd69dab588f29d46b5d6ab28f9e542b43 Mon Sep 17 00:00:00 2001 From: jk <47693+sectore@users.noreply.github.com> Date: Sat, 28 Jun 2025 11:31:30 +0200 Subject: [PATCH] lint all `uninlined_format_args` related @see https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args --- src/app.rs | 2 +- src/widgets/countdown.rs | 2 +- src/widgets/footer.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app.rs b/src/app.rs index fa5f3e5..8591020 100644 --- a/src/app.rs +++ b/src/app.rs @@ -276,7 +276,7 @@ impl App { ClockTypeId::Timer => { format!("{name} stopped by reaching its maximum value.") } - _ => format!("{:?} {name} done!", type_id), + _ => format!("{type_id:?} {name} done!"), }; // notification let result = notify_rust::Notification::new() diff --git a/src/widgets/countdown.rs b/src/widgets/countdown.rs index 181dca7..3e31897 100644 --- a/src/widgets/countdown.rs +++ b/src/widgets/countdown.rs @@ -319,7 +319,7 @@ fn human_days_diff(a: &OffsetDateTime, b: &OffsetDateTime) -> String { match days_diff { 0 => "today".to_owned(), 1 => "tomorrow".to_owned(), - n => format!("+{}days", n), + n => format!("+{n}days"), } } diff --git a/src/widgets/footer.rs b/src/widgets/footer.rs index c36e371..988157f 100644 --- a/src/widgets/footer.rs +++ b/src/widgets/footer.rs @@ -89,7 +89,7 @@ impl StatefulWidget for Footer { let mut style = Style::default(); // Add space for all except last let label = if index < content_labels.len() - 1 { - format!("{} ", label) + format!("{label} ") } else { label.to_string() };