Skip to content

Commit d1f30c1

Browse files
committed
Resolve uninlined_format_args pedantic clippy lint in test
warning: variables can be used directly in the `format!` string --> tests/trait.rs:32:19 | 32 | .push(format!("dropping {}", self)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = 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 | 32 - .push(format!("dropping {}", self)); 32 + .push(format!("dropping {self}")); |
1 parent 1e18d0b commit d1f30c1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tests/trait.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ impl Display for Log {
2626

2727
impl Drop for Log {
2828
fn drop(&mut self) {
29-
self.events
30-
.lock()
31-
.unwrap()
32-
.push(format!("dropping {}", self));
29+
self.events.lock().unwrap().push(format!("dropping {self}"));
3330
}
3431
}
3532

0 commit comments

Comments
 (0)