feat: add search
This commit is contained in:
parent
6251ec1bd9
commit
ecb84e32e1
19 changed files with 710 additions and 106 deletions
|
|
@ -98,11 +98,8 @@ impl FileReporter {
|
|||
|
||||
fn _report(&self, report: &Report) -> Result<()> {
|
||||
let report_path = get_report_path(&self.path, report, "json")?;
|
||||
serde_json::to_writer_pretty(&File::create(report_path)?, &report).or_else(|e| {
|
||||
Err(Error::Other(
|
||||
format!("could not serialize report. err: {}", e).into(),
|
||||
))
|
||||
})?;
|
||||
serde_json::to_writer_pretty(&File::create(report_path)?, &report)
|
||||
.map_err(|e| Error::Other(format!("could not serialize report. err: {}", e).into()))?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue