Unified error handling

This commit is contained in:
David Peter authored and David Peter committed 2022-02-06 20:19:50 +01:00
1 parent 34dabcbed7
commit 2040810ce3
10 files changed
+95 -101

No files matched your search

+4 -5
View File
@@ -1,11 +1,11 @@
use std::io::{Error, ErrorKind, Result};
use super::Exporter;
use crate::benchmark_result::BenchmarkResult;
use crate::format::format_duration_value;
use crate::relative_speed::{self, BenchmarkResultWithRelativeSpeed};
use crate::units::Unit;
use anyhow::{anyhow, Result};
#[derive(Default)]
pub struct MarkdownExporter {}
@@ -31,9 +31,8 @@ impl Exporter for MarkdownExporter {
Ok(destination)
} else {
Err(Error::new(
ErrorKind::Other,
"Relative speed comparison is not available for Markdown export.",
Err(anyhow!(
"Relative speed comparison is not available for Markdown export."
))
}
}