Skip to content

Commit

Permalink
Use anyhow in state dump
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianGCalderon committed Dec 18, 2024
1 parent 8e39701 commit 9809bd6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions replay/src/state_dump.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::{
collections::BTreeMap,
error::Error,
fs::{self, File},
path::Path,
};
Expand Down Expand Up @@ -31,7 +30,7 @@ pub fn dump_state_diff(
state: &mut CachedState<impl StateReader>,
execution_info: &TransactionExecutionInfo,
path: &Path,
) -> Result<(), Box<dyn Error>> {
) -> anyhow::Result<()> {
if let Some(parent) = path.parent() {
let _ = fs::create_dir_all(parent);
}
Expand All @@ -49,7 +48,7 @@ pub fn dump_state_diff(
Ok(())
}

pub fn dump_error(err: &TransactionExecutionError, path: &Path) -> Result<(), Box<dyn Error>> {
pub fn dump_error(err: &TransactionExecutionError, path: &Path) -> anyhow::Result<()> {
if let Some(parent) = path.parent() {
let _ = fs::create_dir_all(parent);
}
Expand Down

0 comments on commit 9809bd6

Please sign in to comment.