From 8c73714ec2d9cc39b86169a9202fd0c5d6319c29 Mon Sep 17 00:00:00 2001 From: Kevin Reid Date: Fri, 27 Dec 2024 13:06:09 -0800 Subject: [PATCH] Lint: Suppress false positives on `indicatif` template strings. --- all-is-cubes-desktop/src/logging.rs | 2 ++ all-is-cubes-desktop/src/record.rs | 2 ++ all-is-cubes-desktop/src/universe_source.rs | 2 ++ 3 files changed, 6 insertions(+) diff --git a/all-is-cubes-desktop/src/logging.rs b/all-is-cubes-desktop/src/logging.rs index e7961c2f6..0574e9d25 100644 --- a/all-is-cubes-desktop/src/logging.rs +++ b/all-is-cubes-desktop/src/logging.rs @@ -202,6 +202,8 @@ pub fn new_progress_bar(len: u64) -> indicatif::ProgressBar { /// [`indicatif::ProgressStyle`] for progress bars we display. pub fn common_progress_style() -> indicatif::ProgressStyle { + #![allow(unknown_lints)] // TODO: Remove in Rust 1.84 + #![allow(clippy::literal_string_with_formatting_args)] indicatif::ProgressStyle::default_bar() .template("{prefix:8} [{elapsed}] {wide_bar} {pos:>6}/{len:6} {msg:30}") .unwrap() diff --git a/all-is-cubes-desktop/src/record.rs b/all-is-cubes-desktop/src/record.rs index a233f4ff5..05eb3ccad 100644 --- a/all-is-cubes-desktop/src/record.rs +++ b/all-is-cubes-desktop/src/record.rs @@ -264,6 +264,8 @@ impl Recorder { pub(crate) async fn record_task(mut self, ctx: &MainTaskContext) { let frame_range = self.options.frame_range(); + #[allow(unknown_lints)] // TODO: Remove in Rust 1.84 + #[allow(clippy::literal_string_with_formatting_args)] let progress_style = indicatif::ProgressStyle::default_bar() .template("{prefix:8} [{elapsed}] {wide_bar} {pos:>6}/{len:6}") .unwrap(); diff --git a/all-is-cubes-desktop/src/universe_source.rs b/all-is-cubes-desktop/src/universe_source.rs index e4b0b760d..b39bd41e2 100644 --- a/all-is-cubes-desktop/src/universe_source.rs +++ b/all-is-cubes-desktop/src/universe_source.rs @@ -41,6 +41,8 @@ impl UniverseSource { // TODO: figure out a cleaner way to wrangle this rx hookup let notif_rx = Mutex::new(TryRecvKeep::Rx(notif_rx)); + #[allow(unknown_lints)] // TODO: Remove in Rust 1.84 + #[allow(clippy::literal_string_with_formatting_args)] let universe_progress_bar = logging::new_progress_bar(100) .with_style( logging::common_progress_style()