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

Add VecSkipError<T> de behavior #383

Merged
merged 12 commits into from
Oct 26, 2021
Merged

Add VecSkipError<T> de behavior #383

merged 12 commits into from
Oct 26, 2021

Conversation

hdhoang
Copy link
Contributor

@hdhoang hdhoang commented Oct 23, 2021

hi! This implements #321

I will added doctest & motivating example based on the SO question.

I'm not sure if this should go into the rust module. I'm also confused about the T and U parameter names on SerializeAs impl, which one should go on VecSkipError.

Hope this helped

@hdhoang hdhoang marked this pull request as ready for review October 23, 2021 03:55
Copy link
Owner

@jonasbb jonasbb left a comment

Choose a reason for hiding this comment

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

Hi, thank you for the PR. I left you some notes on the individual parts. Maybe you could also add a tiny snippet to serde_with/src/guide/serde_as_transformations.md That file contains all the available transformations this crate provides.

README.md Outdated Show resolved Hide resolved
serde_with/src/ser/impls.rs Outdated Show resolved Hide resolved
serde_with/src/ser/impls.rs Outdated Show resolved Hide resolved
serde_with/tests/serde_as/lib.rs Outdated Show resolved Hide resolved
serde_with/src/lib.rs Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 23, 2021

Codecov Report

Merging #383 (3be4743) into master (0243453) will decrease coverage by 0.28%.
The diff coverage is 81.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #383      +/-   ##
==========================================
- Coverage   75.43%   75.15%   -0.29%     
==========================================
  Files          47       47              
  Lines        2842     2858      +16     
==========================================
+ Hits         2144     2148       +4     
- Misses        698      710      +12     
Impacted Files Coverage Δ
serde_with/src/lib.rs 75.00% <ø> (ø)
serde_with/src/de/impls.rs 72.41% <66.66%> (-0.32%) ⬇️
serde_with/src/ser/impls.rs 93.75% <100.00%> (+0.11%) ⬆️
serde_with/tests/serde_as/lib.rs 100.00% <100.00%> (ø)
serde_with/tests/derives/deserialize_fromstr.rs 84.00% <0.00%> (-16.00%) ⬇️
...e_with/src/duplicate_key_impls/first_value_wins.rs 50.00% <0.00%> (-11.54%) ⬇️
...de_with/src/duplicate_key_impls/last_value_wins.rs 90.00% <0.00%> (-10.00%) ⬇️
...with/src/duplicate_key_impls/error_on_duplicate.rs 90.00% <0.00%> (-10.00%) ⬇️
serde_with/src/utils.rs 87.87% <0.00%> (-6.07%) ⬇️
serde_with/src/utils/duration.rs 87.79% <0.00%> (-0.65%) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0243453...3be4743. Read the comment docs.

@hdhoang hdhoang requested a review from jonasbb October 26, 2021 01:41
Copy link
Owner

@jonasbb jonasbb left a comment

Choose a reason for hiding this comment

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

Thanks for working on this. I updated the documentation in serde_as_transformations.md a bit. The rest looks good.

@jonasbb
Copy link
Owner

jonasbb commented Oct 26, 2021

bors merge

@bors
Copy link
Contributor

bors bot commented Oct 26, 2021

Build succeeded:

@bors bors bot merged commit 4fdb021 into jonasbb:master Oct 26, 2021
@hdhoang hdhoang deleted the vec-skip-error branch November 1, 2021 14:39
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