Skip to content

Commit

Permalink
feat: better logs
Browse files Browse the repository at this point in the history
  • Loading branch information
pxseu committed Sep 18, 2023
1 parent 68b6b70 commit 6b79cd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/store/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ macro_rules! impl_store {
let mut buffer = String::new();
file.read_to_string(&mut buffer).await?;

serde_json::from_str(&buffer).context("Failed to deserialize")
serde_json::from_str(&buffer).context(format!("Failed to deserialize {} store", stringify!($name)))
}

async fn save(&self) -> Result<Self> {
Expand All @@ -37,7 +37,7 @@ macro_rules! impl_store {

file.write_all(
serde_json::to_string(&self)
.context("Failed to serialize")?
.context(format!("Failed to serialize {} store", stringify!($name)))?
.as_bytes(),
)
.await
Expand Down

0 comments on commit 6b79cd2

Please sign in to comment.