diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2024-04-29 09:27:55 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-29 09:27:55 -0400 |
| commit | 7d937045910968fbb2c050e803d79bc1c1e5984b (patch) | |
| tree | da37cb683d73cbe67d720646c8572647c47df000 /cli/tools/bench/reporters.rs | |
| parent | 0b454056a8f65061717cdaf7d93f50a8ecf7e14b (diff) | |
refactor: remove conditional color code in bench reporter (#23593)
There is no need for this conditional code because it's handled by the
`colors` module.
Diffstat (limited to 'cli/tools/bench/reporters.rs')
| -rw-r--r-- | cli/tools/bench/reporters.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/cli/tools/bench/reporters.rs b/cli/tools/bench/reporters.rs index face54943..9cc035f8f 100644 --- a/cli/tools/bench/reporters.rs +++ b/cli/tools/bench/reporters.rs @@ -138,7 +138,6 @@ impl BenchReporter for ConsoleReporter { let options = self.options.as_mut().unwrap(); options.percentiles = true; - options.colors = colors::use_color(); if FIRST_PLAN .compare_exchange(true, false, Ordering::SeqCst, Ordering::SeqCst) @@ -246,10 +245,9 @@ impl BenchReporter for ConsoleReporter { } fn report_group_summary(&mut self) { - let options = match self.options.as_ref() { - None => return, - Some(options) => options, - }; + if self.options.is_none() { + return; + } if 2 <= self.group_measurements.len() && (self.group.is_some() || (self.group.is_none() && self.baseline)) @@ -275,7 +273,6 @@ impl BenchReporter for ConsoleReporter { }, }) .collect::<Vec<mitata::reporter::GroupBenchmark>>(), - options ) ); } |
