join: print unsorted line in error message#2899
Merged
tertsdiepraam merged 1 commit intouutils:mainfrom Jan 21, 2022
Merged
Conversation
tertsdiepraam
requested changes
Jan 21, 2022
Collaborator
tertsdiepraam
left a comment
There was a problem hiding this comment.
Nice work! I just have one small suggestion and one test needs to be adapted for this change.
You can run the tests yourself to check before you push with:
cargo test --features join --no-default-features
Those flags will ensure that only join is compiled and tested, saving some time.
914b3d1 to
d2348a2
Compare
Contributor
Author
|
Thank you for the feedback, this is ready for another review :) |
Contributor
Author
|
Whoops, still getting the hang of |
This expands the error message that is printed if either input file has an unsorted line. Both the program name (join) and the offending line are printed out with the message to match the behaviour of the GNU utility.
d2348a2 to
67878de
Compare
tertsdiepraam
approved these changes
Jan 21, 2022
Collaborator
tertsdiepraam
left a comment
There was a problem hiding this comment.
Thanks for the fixes! We can merge this once the CI is green.
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 expands the error message that is printed if either input file has
an unsorted line. Both the program name (join) and the offending line
are printed out with the message to match the behaviour of the GNU
utility.
Note: while copying the input string with
clonemay look bad, this makes theSep::Linearm have the same performance as the rest of the match arms (which clone the input line in their calls toVec::from).