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

Error instead of panic when deserializing non-identifier field name #415

Merged
merged 3 commits into from
Oct 7, 2022

Conversation

juntyr
Copy link
Member

@juntyr juntyr commented Oct 7, 2022

It took me a while but the unimplemented!() panic could in theory have been triggered from user code. Now, deserialising a field name with a type that requests a non-identifier from serde will produce an error instead of panicking.

  • I've included my change in CHANGELOG.md

@juntyr juntyr marked this pull request as ready for review October 7, 2022 13:11
@codecov-commenter
Copy link

Codecov Report

Base: 88.84% // Head: 91.25% // Increases project coverage by +2.41% 🎉

Coverage data is based on head (6c4af07) compared to base (7a68926).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #415      +/-   ##
==========================================
+ Coverage   88.84%   91.25%   +2.41%     
==========================================
  Files          55       56       +1     
  Lines        6437     6542     +105     
==========================================
+ Hits         5719     5970     +251     
+ Misses        718      572     -146     
Impacted Files Coverage Δ
tests/203_error_positions.rs 100.00% <ø> (+1.23%) ⬆️
src/de/id.rs 100.00% <100.00%> (+84.30%) ⬆️
src/value/raw.rs 100.00% <100.00%> (ø)
tests/non_identifier_identifier.rs 100.00% <100.00%> (ø)

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 2b9a50c into ron-rs:master Oct 7, 2022
@juntyr juntyr deleted the non-identifier-identifier branch October 7, 2022 13:14
juntyr added a commit to juntyr/ron that referenced this pull request Aug 15, 2023
…on-rs#415)

* Error instead of panic when deserializing non-identifier field name

* Fix code coverage for tests

* Added CHANGELOG entry
juntyr added a commit to juntyr/ron that referenced this pull request Aug 16, 2023
…on-rs#415)

* Error instead of panic when deserializing non-identifier field name

* Fix code coverage for tests

* Added CHANGELOG entry
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.

2 participants