Skip to content

Avoid debug printing error in thiserror.md#3124

Merged
mgeisler merged 1 commit intomainfrom
mgeisler-patch-3
Mar 9, 2026
Merged

Avoid debug printing error in thiserror.md#3124
mgeisler merged 1 commit intomainfrom
mgeisler-patch-3

Conversation

@mgeisler
Copy link
Collaborator

@mgeisler mgeisler commented Mar 6, 2026

One point about Rust error handling is that errors should know how to Display print themselves, not just Debug print. So the example here and elsewhere should avoid debug printing the error and thus show that we use the format string from #[error(...)].

One point about Rust error handling is that errors should know how to `Display` print themselves, not just `Debug` print. So the example here and elsewhere should avoid debug printing the error and thus show that we use the format string from `#[error(...)]`.
@mgeisler mgeisler requested review from djmitche and gribozavr March 9, 2026 13:19
@mgeisler mgeisler enabled auto-merge (squash) March 9, 2026 13:19
@mgeisler mgeisler merged commit 9b5c1a1 into main Mar 9, 2026
40 checks passed
@mgeisler mgeisler deleted the mgeisler-patch-3 branch March 9, 2026 17:17
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