Skip to content
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

Change the string token parsing to bump by total_len, instead of remainder[0..total_len].as_bytes().len() #681

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LikeLakers2
Copy link

Hi, this is my first PR here. I was looking through how taplo parses inputs, and saw the string parsing functions could be slightly optimized.

To explain my thought process for this change:

I was not able to test this PR locally, as cargo test would fail due to issues compiling pprof on my Windows machine, but I did use a separate branch in my fork to run the GitHub workflows, which you can see the results of here: https://github.com/LikeLakers2/taplo/actions/runs/10974635267

If I missed anything, or if my thought process is wrong, please let me know. :) Thank you in advance for reviewing my PR!

...so there's no need to get that slice of `remainder`, convert it to `&[u8]`, and get the length of that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant