mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-02 01:00:31 +00:00
Unified error handling
This commit is contained in:
1 parent
34dabcbed7
commit
2040810ce3
10 files changed
+95
-101
No files matched your search
@@ -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."
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user