From 9809bd651acd36a72aad613e655b319fe6f381af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Wed, 18 Dec 2024 10:38:59 -0300 Subject: [PATCH] Use anyhow in state dump --- replay/src/state_dump.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); }