-
Notifications
You must be signed in to change notification settings - Fork 38
Manual clippy fixes. #480
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
Merged
Merged
Manual clippy fixes. #480
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just two things I notice here, but I'm a bit doubtful that either of these observations require changes to the patch?
First the
jvalue returned and theStringvalue returned are somewhat out of sorts in the(usize, String)return value such thatj > i + returned_string.len().The other thing I noticed, is in regard to the set of whitespace allowed by the rust std libraries
trimfunctionin 38e92e9 we added some stuff to lrlex, and avoided the
trimfunction because it allows some funky characters to be used as whitespace.However it doesn't seem like I ever did the same for
lrparwhich is currently already usingtrim()inparse_action. But it seems like a good idea to keep the set of allowed whitespace the same between lrlex and lrpar?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct.
Yes, you're probably right. I'm not quite sure how one would do that here though, but unicode is not my strong point!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, as long as you were aware of the first it doesn't seem like anything that could cause any actual issues to me.
The second thing is probably low priority, could be done in a followup patch if either of us or anyone else gets around to it.
It mostly involves copy/pasting the
matches_whitespacefunction fromlrlexfrom 38e92e9 replacingtrimcalls withtrim_matches.the
parse_wsfunction inyacc/parser.rsI'll note hard codes ASCII whitespace characters using match rather than usingis_whitespaceso it at least that currently isn't allowing funky whitespace.