Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small improvements to error formatting #407

Merged
merged 3 commits into from
Feb 6, 2025

Conversation

nicholasbishop
Copy link
Owner

  • For Corrupt/Incompatible errors, change the Display impl to say "corrupt filesystem"/"incompatible filesystem" so the error is clearer when printed in isolation
  • Make the Debug impl for Corrupt pass through to the inner CorruptKind. This shortens the output from, e.g., Corrupt(Corrupt(BlockRead { .. })) to Corrupt(BlockRead { .. }).
  • Add a test.

Add the word "filesystem". "corrupt filesystem"/"incompatible
filesystem" makes errors a little clearer if printed in isolation.
Since the `Corrupt` type is just a thin wrapper used to make the inner
enum opaque, make it invisible in the `Debug` format.
@nicholasbishop nicholasbishop force-pushed the bishop-improve-corrupt-fmt branch from b749b82 to 2a1d060 Compare February 6, 2025 18:22
@nicholasbishop nicholasbishop enabled auto-merge (rebase) February 6, 2025 18:22
@nicholasbishop nicholasbishop merged commit e314113 into main Feb 6, 2025
11 checks passed
@nicholasbishop nicholasbishop deleted the bishop-improve-corrupt-fmt branch February 6, 2025 18:24
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