Skip to content

Use with_context for non-trivial contexts#632

Merged
mkeeter merged 1 commit intomasterfrom
mkeeter/with-context
Apr 27, 2026
Merged

Use with_context for non-trivial contexts#632
mkeeter merged 1 commit intomasterfrom
mkeeter/with-context

Conversation

@mkeeter
Copy link
Copy Markdown
Contributor

@mkeeter mkeeter commented Apr 24, 2026

If the context is anything other than a static string, we should use with_context to avoid doing the work (typically a format!(..) call). This probably doesn't make a noticeably difference, but is a pet peeve of mine.

@mkeeter mkeeter requested a review from labbott April 24, 2026 13:59
@mkeeter mkeeter force-pushed the mkeeter/with-context branch from aafc447 to 42f426e Compare April 24, 2026 14:00
@mkeeter mkeeter force-pushed the mkeeter/with-context branch from 42f426e to 4bc9f9a Compare April 27, 2026 15:38
@mkeeter mkeeter merged commit 03d0293 into master Apr 27, 2026
12 checks passed
@mkeeter mkeeter deleted the mkeeter/with-context branch April 27, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants