Skip to content

Commit

Permalink
Lint: Suppress false positives on indicatif template strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
kpreid committed Dec 27, 2024
1 parent 26f482d commit 8c73714
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions all-is-cubes-desktop/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 2 additions & 0 deletions all-is-cubes-desktop/src/record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions all-is-cubes-desktop/src/universe_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 8c73714

Please sign in to comment.