Skip to content

Commit

Permalink
Ignore uninlined_format_args pedantic clippy lint
Browse files Browse the repository at this point in the history
    warning: variables can be used directly in the `format!` string
      --> benches/timer.rs:16:13
       |
    16 |     let _ = writeln!(&mut writer, "{} in {} mode: {} micros", name, mode, micros);
       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
       = note: `-W clippy::uninlined-format-args` implied by `-W clippy::pedantic`
    help: change this to
       |
    16 -     let _ = writeln!(&mut writer, "{} in {} mode: {} micros", name, mode, micros);
    16 +     let _ = writeln!(&mut writer, "{name} in {mode} mode: {micros} micros");
       |
  • Loading branch information
dtolnay committed Jun 16, 2023
1 parent f559bb7 commit 47e1066
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion benches/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#![allow(clippy::cast_lossless, clippy::let_underscore_untyped)]
#![allow(
clippy::cast_lossless,
clippy::let_underscore_untyped,
clippy::uninlined_format_args
)]

use quote::quote;

Expand Down
6 changes: 5 additions & 1 deletion benches/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#![allow(unknown_lints, special_module_name)]
#![allow(clippy::cast_lossless, clippy::let_underscore_untyped)]
#![allow(
clippy::cast_lossless,
clippy::let_underscore_untyped,
clippy::uninlined_format_args
)]

quote_benchmark::run_quote_benchmark!(_);

Expand Down

0 comments on commit 47e1066

Please sign in to comment.