diff options
author | Matthias Beyer <matthias.beyer@ifm.com> | 2022-08-18 15:19:59 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@ifm.com> | 2022-08-18 15:40:40 +0200 |
commit | f2a14038f7f395f8439b62cc70ad259ffa09a205 (patch) | |
tree | 3b388b89823ac333e541755101c1a2cd812dfe6f | |
parent | c75b2e84b2af06f6c7e271cbebb09c10034d3044 (diff) |
Fix clippy: tests: Do not use format!() to append to String
This fixes clippy::format_push_string.
The error returned from write!() is ignored in this case.
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
-rw-r--r-- | crates/tests/sawtooth_publisher/src/main.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/tests/sawtooth_publisher/src/main.rs b/crates/tests/sawtooth_publisher/src/main.rs index ff89aaa1..527eefd3 100644 --- a/crates/tests/sawtooth_publisher/src/main.rs +++ b/crates/tests/sawtooth_publisher/src/main.rs @@ -9,6 +9,7 @@ use mqtt_channel::{ }; use std::convert::TryFrom; use std::env; +use std::fmt::Write as _; use std::io::Write; use std::process; use std::time::{Duration, Instant}; @@ -163,7 +164,8 @@ async fn publish_multi_topic( for value in 0..height { let mut series: String = String::new(); for s in 0..series_count { - series += &format!( + let _ = write!( + series, "\"saw_{}\": {} ,", s, (value + s * height / series_count) % height |