Move Exporter::unit => determine_unit_from_results

This commit is contained in:
David Peter authored and David Peter committed 2022-05-15 21:37:40 +02:00
1 parent 69d38a5f8e
commit 8741d05d11
2 files changed
+20 -25

No files matched your search

+2 -2
View File
@@ -1,4 +1,4 @@
use super::Exporter;
use super::{determine_unit_from_results, Exporter};
use crate::benchmark::benchmark_result::BenchmarkResult;
use crate::benchmark::relative_speed;
use crate::export::markup::MarkupFormatter;
@@ -28,7 +28,7 @@ pub struct MarkdownExporter {}
impl Exporter for MarkdownExporter {
fn serialize(&self, results: &[BenchmarkResult], unit: Option<Unit>) -> Result<Vec<u8>> {
let unit = self.unit(results, unit);
let unit = determine_unit_from_results(results, unit);
let entries = relative_speed::compute(results);
if entries.is_none() {
return Err(anyhow!(