diff --git a/replay/src/state_dump.rs b/replay/src/state_dump.rs index 2b838be..e21d1da 100644 --- a/replay/src/state_dump.rs +++ b/replay/src/state_dump.rs @@ -1,6 +1,5 @@ use std::{ collections::BTreeMap, - error::Error, fs::{self, File}, path::Path, }; @@ -31,7 +30,7 @@ pub fn dump_state_diff( state: &mut CachedState, execution_info: &TransactionExecutionInfo, path: &Path, -) -> Result<(), Box> { +) -> anyhow::Result<()> { if let Some(parent) = path.parent() { let _ = fs::create_dir_all(parent); } @@ -49,7 +48,7 @@ pub fn dump_state_diff( Ok(()) } -pub fn dump_error(err: &TransactionExecutionError, path: &Path) -> Result<(), Box> { +pub fn dump_error(err: &TransactionExecutionError, path: &Path) -> anyhow::Result<()> { if let Some(parent) = path.parent() { let _ = fs::create_dir_all(parent); }