Skip to content

Commit

Permalink
fix: format error context in Message::load_from_db
Browse files Browse the repository at this point in the history
  • Loading branch information
link2xt committed Apr 14, 2024
1 parent b6c6a63 commit 489eae5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ impl Message {
pub async fn load_from_db(context: &Context, id: MsgId) -> Result<Message> {
let message = Self::load_from_db_optional(context, id)
.await?
.context("Message {id} does not exist")?;
.with_context(|| format!("Message {id} does not exist"))?;
Ok(message)
}

Expand Down

0 comments on commit 489eae5

Please sign in to comment.