Skip to content

Implemented ron::value::RawValue#407

Merged
juntyr merged 4 commits into
ron-rs:masterfrom
juntyr:407-raw-value
Sep 12, 2022
Merged

Implemented ron::value::RawValue#407
juntyr merged 4 commits into
ron-rs:masterfrom
juntyr:407-raw-value

Conversation

@juntyr

@juntyr juntyr commented Sep 11, 2022

Copy link
Copy Markdown
Member

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
@juntyr juntyr requested a review from torkleyy September 11, 2022 08:25
@codecov-commenter

codecov-commenter commented Sep 11, 2022

Copy link
Copy Markdown

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

juntyr commented Sep 11, 2022

Copy link
Copy Markdown
Member Author

?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.

@torkleyy torkleyy left a comment

Copy link
Copy Markdown
Member

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