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

Introduce internal CanonicalToken type to simplify token equality comparisons #31

Merged
merged 14 commits into from
Dec 23, 2023

Conversation

Anders429
Copy link
Owner

This fixes both #27 and #28.

Canonical tokens separate out the internal behavior of tokens from the external behavior. External behavior needs Unordered tokens, but internal doesn't; similarly, internal behavior just needs to emit CanonicalTokens from the Serializer, which will never need Unordered tokens. Separating these two cases vastly simplifies equality comparisons, removing the need for a dependency on hashbrown.

Copy link

codecov bot commented Dec 23, 2023

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (b6005f0) 98.18% compared to head (e403871) 98.00%.
Report is 3 commits behind head on dev.

Files Patch % Lines
src/token.rs 98.89% 8 Missing ⚠️
src/de.rs 99.63% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #31      +/-   ##
==========================================
- Coverage   98.18%   98.00%   -0.19%     
==========================================
  Files           3        3              
  Lines        6446     6254     -192     
==========================================
- Hits         6329     6129     -200     
- Misses        117      125       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Anders429
Copy link
Owner Author

Loss in code coverage is acceptable. All of the missing lines are in tests and seem to be false positives.

@Anders429 Anders429 merged commit 2c0a013 into dev Dec 23, 2023
29 of 30 checks passed
@Anders429 Anders429 deleted the canonical branch December 23, 2023 20:02
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