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

Implemented ron::value::RawValue #407

Merged
merged 4 commits into from
Sep 12, 2022
Merged

Conversation

juntyr
Copy link
Member

@juntyr juntyr commented Sep 11, 2022

Adds the ron::value::RawValue type, inspired by serde-rs, which holds a valid RON fragment string and can be (de)serialised inside any container.

  • I've included my change in CHANGELOG.md

@juntyr juntyr self-assigned this Sep 11, 2022
@codecov-commenter
Copy link

codecov-commenter commented Sep 11, 2022

Codecov Report

Merging #407 (c4d05b3) into master (a63b3c8) will increase coverage by 1.02%.
The diff coverage is 74.01%.

@@            Coverage Diff             @@
##           master     #407      +/-   ##
==========================================
+ Coverage   78.74%   79.76%   +1.02%     
==========================================
  Files          51       54       +3     
  Lines        6737     7068     +331     
==========================================
+ Hits         5305     5638     +333     
+ Misses       1432     1430       -2     
Impacted Files Coverage Δ
src/error.rs 36.36% <0.00%> (+0.06%) ⬆️
src/value/mod.rs 67.47% <ø> (ø)
src/ser/raw.rs 5.21% <5.21%> (ø)
src/value/raw.rs 99.20% <99.20%> (ø)
src/de/mod.rs 76.02% <100.00%> (+2.10%) ⬆️
src/parse.rs 79.53% <100.00%> (ø)
src/ser/mod.rs 74.63% <100.00%> (-3.64%) ⬇️
tests/407_raw_value.rs 100.00% <100.00%> (ø)
... and 3 more

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

@juntyr
Copy link
Member Author

juntyr commented Sep 11, 2022

?r @torkleyy I stumbled across this API some time ago and thought it would be quite useful to also have it inside ron. While I added some convenience functions to RawValue for the common cases, I decided against implementing Serializer and Deserializer directly as those would only duplicate functionality which is already available by just using the existing Deserializer with the &str one can get from RawValue.

Copy link
Contributor

@torkleyy torkleyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense & looks good to me :)

@juntyr juntyr merged commit 298f918 into ron-rs:master Sep 12, 2022
@juntyr juntyr deleted the 407-raw-value branch September 12, 2022 06:01
@juntyr juntyr mentioned this pull request Sep 18, 2022
17 tasks
juntyr added a commit to juntyr/ron that referenced this pull request Aug 16, 2023
* Implemented ron::value::RawValue

* Added more test cases for full coverage
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.

3 participants