Repository navigation
Conversation
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.
convert_min_sizemultiplied the parsed number by the unit without an overflow check, and silently ignored numbers that do not fit inusize.dust -z 99999999Tpanics in debug builds ("attempt to multiply with overflow") and wraps silently in release builds, so the filter ends up with a wrong size.dust -z 18446744073709551616was dropped with no message, unlike other invalid values.This uses
checked_muland treats any value that can't be represented like the other invalid values: it printsIgnoring invalid min-size: <input>and the option is ignored.Behavior changes to be aware of:
usize::MAXnow print the existing "Ignoring invalid min-size" warning instead of being dropped silently.Tsuffix value used to becomeSome(0)without a warning; it now givesNonewith the warning.Testing: on x86_64 debug, the config unit tests pass (37), and the new assertions fail on the base commit and pass with this change. The integration tests have 4 failures that are identical with and without this change. I did not run 32-bit binaries (only a 32-bit
cargo check --tests), and I did not get a fully green full test run.