Skip to content

Commit caef3c6

Browse files
committed
Ignore uninlined_format_args pedantic clippy lint
warning: variables can be used directly in the `format!` string --> src/ser.rs:448:15 | 448 | match write!(adapter, "{}", value) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = 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: to override `-W clippy::pedantic` add `#[allow(clippy::uninlined_format_args)]` help: change this to | 448 - match write!(adapter, "{}", value) { 448 + match write!(adapter, "{value}") { | warning: variables can be used directly in the `format!` string --> src/value/mod.rs:182:37 | 182 | Value::Bool(boolean) => write!(formatter, "Bool({})", boolean), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 182 - Value::Bool(boolean) => write!(formatter, "Bool({})", boolean), 182 + Value::Bool(boolean) => write!(formatter, "Bool({boolean})"), | warning: variables can be used directly in the `format!` string --> src/value/mod.rs:184:38 | 184 | Value::String(string) => write!(formatter, "String({:?})", string), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 184 - Value::String(string) => write!(formatter, "String({:?})", string), 184 + Value::String(string) => write!(formatter, "String({string:?})"), | warning: variables can be used directly in the `format!` string --> src/number.rs:365:9 | 365 | write!(formatter, "Number({})", self) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 365 - write!(formatter, "Number({})", self) 365 + write!(formatter, "Number({self})") |
1 parent 81ba3aa commit caef3c6

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@
320320
clippy::transmute_ptr_to_ptr,
321321
clippy::unbuffered_bytes,
322322
clippy::unconditional_recursion, // https://github.com/rust-lang/rust-clippy/issues/12133
323+
clippy::uninlined_format_args,
323324
clippy::unnecessary_wraps
324325
)]
325326
// Ignored clippy_pedantic lints

tests/debug.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(clippy::uninlined_format_args)]
2+
13
use indoc::indoc;
24
use serde_json::{json, Number, Value};
35

tests/test.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
clippy::let_underscore_untyped,
1212
clippy::shadow_unrelated,
1313
clippy::too_many_lines,
14+
clippy::uninlined_format_args,
1415
clippy::unreadable_literal,
1516
clippy::unseparated_literal_suffix,
1617
clippy::vec_init_then_push,

0 commit comments

Comments
 (0)