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

+3 -4
View File
@@ -1,5 +1,4 @@
use std::borrow::Cow;
use std::io::{Error, ErrorKind, Result};
use csv::WriterBuilder;
@@ -7,6 +6,8 @@ use super::Exporter;
use crate::benchmark_result::BenchmarkResult;
use crate::units::Unit;
use anyhow::Result;
#[derive(Default)]
pub struct CsvExporter {}
@@ -49,9 +50,7 @@ impl Exporter for CsvExporter {
writer.write_record(fields)?;
}
writer
.into_inner()
.map_err(|e| Error::new(ErrorKind::Other, e))
Ok(writer.into_inner()?)
}
}