Merged
Conversation
|
GNU testsuite comparison: |
fc60028 to
2035092
Compare
68cb1c1 to
17769e5
Compare
|
GNU testsuite comparison: |
197409f to
abd438f
Compare
Collaborator
Author
|
@sylvestre @cakebaker ping for review ^^ |
cakebaker
reviewed
Nov 25, 2024
| /// from the expectation. | ||
| pub failed_cksum: u32, | ||
| pub failed_open_file: u32, | ||
| /// number |
Contributor
There was a problem hiding this comment.
This comment looks incomplete ;-)
cakebaker
reviewed
Nov 25, 2024
| )), | ||
| } | ||
| BASE64.decode(ck).map(hex::encode).ok() | ||
| } else if ck.len() % 2 != 0 { |
Contributor
There was a problem hiding this comment.
A (pedantic) detail: I would use == for better readability and swap the if and else parts.
cakebaker
reviewed
Nov 25, 2024
cakebaker
reviewed
Nov 25, 2024
Contributor
cakebaker
left a comment
There was a problem hiding this comment.
There are two minor details, otherwise it looks good :)
abd438f to
01bda53
Compare
- Rename the function to emphasize its goal - Do not pass the filename anymore, as it is only used to create an error, that may be done in the scope calling the function - Change the return type to Option, as the error is made in the outer scope - Don't try to decode the base64 string as UTF8 string. This most oftenly fails and is wrong. - Get rid of the `bytes_to_hex` function, as it provides the same functionality as `hex::encode`
- Add comments to explain what each field is counting
01bda53 to
cfc66f9
Compare
Collaborator
Author
Thanks for noticing these |
Contributor
|
Thanks! |
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.
This PR further rework
checksum.rsto get rid of entangled variable processing.It also partly fixes #6576, for the case where the digest has an odd length (it may still fail in case the length is even but still wrong)