Repository navigation
numfmt: diagnose write errors instead of panicking - #14715
Merged
Merged
Conversation
46 of 74 tasks
sylvestre
force-pushed
the
gnu912-numfmt-write-error
branch
from
September 19, 2026 10:26
e9ae345 to
02b4cab
Compare
Devel08
reviewed
Sep 19, 2026
| /// What can go wrong while writing a formatted line: either the line itself is | ||
| /// not convertible (which `--invalid` decides what to do with), or the output | ||
| /// could not be written at all (which is always fatal). | ||
| pub enum WriteError { |
Contributor
There was a problem hiding this comment.
We could also wrap errors with thiserror as it is done that way in a lot of other utils, or should we do that in a different PR when that one gets merged?
Contributor
Author
There was a problem hiding this comment.
WriteError is internal plumbing, not a reported error - it's never displayed, so a thiserror derive would only add an unused Display. numfmt's reported errors already use thiserror in errors.rs.
Contributor
|
The new test fails on macOS and Android. |
sylvestre
force-pushed
the
gnu912-numfmt-write-error
branch
from
September 21, 2026 08:34
7ea48e5 to
be203d0
Compare
sylvestre
enabled auto-merge (rebase)
September 21, 2026 08:58
|
GNU testsuite comparison: |
/dev/full does not exist on OpenBSD, macOS or Android, so opening it fails with EACCES and the test panics.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.