Skip to content

Commit c8ba516

Browse files
committed
refactor(decode_ideltachat): construct error message lazily
1 parent 4b021f5 commit c8ba516

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/qr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ async fn decode_ideltachat(context: &Context, prefix: &str, qr: &str) -> Result<
539539
let qr = qr.replacen('&', "#", 1);
540540
decode_openpgp(context, &qr)
541541
.await
542-
.context(format!("failed to decode {prefix} QR code"))
542+
.with_context(|| format!("failed to decode {prefix} QR code"))
543543
}
544544

545545
/// scheme: `DCACCOUNT:https://example.org/new_email?t=1w_7wDjgjelxeX884x96v3`

0 commit comments

Comments
 (0)