Skip to content

Commit 221e3d4

Browse files
committed
Resolve uninlined_format_args pedantic clippy lint
warning: variables can be used directly in the `format!` string --> tests/f2s_test.rs:67:9 | 67 | assert!(!f.is_finite(), "f={}", f); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = 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 | 67 - assert!(!f.is_finite(), "f={}", f); 67 + assert!(!f.is_finite(), "f={f}"); | warning: variables can be used directly in the `format!` string --> tests/d2s_test.rs:74:9 | 74 | assert!(!f.is_finite(), "f={}", f); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = 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 | 74 - assert!(!f.is_finite(), "f={}", f); 74 + assert!(!f.is_finite(), "f={f}"); |
1 parent c667b72 commit 221e3d4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/d2s_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ fn test_random() {
7171
fn test_non_finite() {
7272
for i in 0u64..1 << 23 {
7373
let f = f64::from_bits((((1 << 11) - 1) << 52) + (i << 29));
74-
assert!(!f.is_finite(), "f={}", f);
74+
assert!(!f.is_finite(), "f={f}");
7575
ryu::Buffer::new().format_finite(f);
7676
}
7777
}

tests/f2s_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ fn test_random() {
6464
fn test_non_finite() {
6565
for i in 0u32..1 << 23 {
6666
let f = f32::from_bits((((1 << 8) - 1) << 23) + i);
67-
assert!(!f.is_finite(), "f={}", f);
67+
assert!(!f.is_finite(), "f={f}");
6868
ryu::Buffer::new().format_finite(f);
6969
}
7070
}

0 commit comments

Comments
 (0)