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

Implement serde::Serialize and serde::Deserialize #6

Closed
wants to merge 1 commit into from

Conversation

hdoordt
Copy link

@hdoordt hdoordt commented Oct 22, 2023

Thanks for making this! I wanted to add support for serde, so:

Implement serde::Serialize and serde::Deserialize via FromStr impl and Iban::as_str

@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Merging #6 (5c9fc85) into main (7003ed5) will decrease coverage by 2.18%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main       #6      +/-   ##
==========================================
- Coverage   95.37%   93.19%   -2.18%     
==========================================
  Files           2        2              
  Lines         389      397       +8     
  Branches      389      397       +8     
==========================================
- Hits          371      370       -1     
- Misses          6       13       +7     
- Partials       12       14       +2     
Files Coverage Δ
src/lib.rs 92.12% <0.00%> (-2.52%) ⬇️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@JohnPeel
Copy link
Owner

Your solution doesn't work in no-std, and we could take advantage of arrayvec's serde feature to simplify the change.

@JohnPeel
Copy link
Owner

JohnPeel commented Oct 26, 2023

Implemented in 77affba

Though it doesn't support hyphenated Ibans yet. Using from_str in a custom deserializer (or using derive) is a better idea.

Still working out how I want to support multiple serialization formats.

@JohnPeel JohnPeel closed this Oct 26, 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.

2 participants