summaryrefslogtreecommitdiff
path: root/cli/tools/bench/reporters.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-05-08 22:45:06 -0400
committerGitHub <noreply@github.com>2024-05-08 22:45:06 -0400
commit47f7bed677a6b72e873712de8f3988ea891710e4 (patch)
tree096549459b479cf1383e65c87b77e9f9482df258 /cli/tools/bench/reporters.rs
parente6dc4dfbff25e77d2127591802229b4a74037d24 (diff)
chore: enable clippy::print_stdout and clippy::print_stderr (#23732)
1. Generally we should prefer to use the `log` crate. 2. I very often accidentally commit `eprintln`s. When we should use `println` or `eprintln`, it's not too bad to be a bit more verbose and ignore the lint rule.
Diffstat (limited to 'cli/tools/bench/reporters.rs')
-rw-r--r--cli/tools/bench/reporters.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/tools/bench/reporters.rs b/cli/tools/bench/reporters.rs
index 9cc035f8f..b5229cf0a 100644
--- a/cli/tools/bench/reporters.rs
+++ b/cli/tools/bench/reporters.rs
@@ -50,6 +50,7 @@ impl JsonReporter {
}
}
+#[allow(clippy::print_stdout)]
impl BenchReporter for JsonReporter {
fn report_group_summary(&mut self) {}
#[cold]
@@ -58,7 +59,7 @@ impl BenchReporter for JsonReporter {
fn report_end(&mut self, _report: &BenchReport) {
match write_json_to_stdout(self) {
Ok(_) => (),
- Err(e) => println!("{e}"),
+ Err(e) => println!("{}", e),
}
}
@@ -118,6 +119,7 @@ impl ConsoleReporter {
}
}
+#[allow(clippy::print_stdout)]
impl BenchReporter for ConsoleReporter {
#[cold]
fn report_plan(&mut self, plan: &BenchPlan) {