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

Fix trailing comma parsing in tuples and Some #412

Merged
merged 1 commit into from
Oct 4, 2022

Conversation

juntyr
Copy link
Member

@juntyr juntyr commented Oct 4, 2022

Fixes #410 trailing commas in all Some, tuples, structs, lists, maps, and enums.

  • after using CommaSeparated we only need to skip whitespace, not an extra comma
  • after newtype structs or variants we need to explicitly allow trailing commas
  • I've included my change in CHANGELOG.md

@codecov-commenter
Copy link

Codecov Report

Base: 79.81% // Head: 88.86% // Increases project coverage by +9.04% 🎉

Coverage data is based on head (516a14c) compared to base (298f918).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #412      +/-   ##
==========================================
+ Coverage   79.81%   88.86%   +9.04%     
==========================================
  Files          54       55       +1     
  Lines        7080     6437     -643     
==========================================
+ Hits         5651     5720      +69     
+ Misses       1429      717     -712     
Impacted Files Coverage Δ
src/de/mod.rs 93.52% <100.00%> (+17.49%) ⬆️
tests/410_trailing_comma.rs 100.00% <100.00%> (ø)
tests/250_variant_newtypes.rs 100.00% <0.00%> (+5.63%) ⬆️
src/error.rs 42.62% <0.00%> (+6.25%) ⬆️
src/de/tests.rs 100.00% <0.00%> (+6.57%) ⬆️
tests/numbers.rs 100.00% <0.00%> (+8.10%) ⬆️
src/de/value.rs 87.40% <0.00%> (+11.52%) ⬆️
tests/203_error_positions.rs 98.76% <0.00%> (+12.74%) ⬆️
src/parse.rs 92.55% <0.00%> (+13.01%) ⬆️
tests/123_enum_representation.rs 100.00% <0.00%> (+13.27%) ⬆️
... and 12 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@juntyr juntyr merged commit 7a68926 into ron-rs:master Oct 4, 2022
@juntyr juntyr deleted the 410-trailing-comma branch October 4, 2022 06:11
juntyr added a commit to juntyr/ron that referenced this pull request Aug 15, 2023
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.

Trailing comma in Some()
2 participants