Skip to content

feat: add serde support for ISO3166 2/3#19

Open
SandmeyerX wants to merge 1 commit intorust-iso:mainfrom
SandmeyerX:main
Open

feat: add serde support for ISO3166 2/3#19
SandmeyerX wants to merge 1 commit intorust-iso:mainfrom
SandmeyerX:main

Conversation

@SandmeyerX
Copy link

@SandmeyerX SandmeyerX commented Jan 13, 2026

  • Implement Serialize/Deserialize for ISO3166-2 and ISO3166-3
  • Improve code by cargo fmt
  • Fix clippy warning
  • Add serde round-trip tests to ensure correctness

Checklist:

  • Run cargo fmt
  • cargo clippy no warning
  • All tests passed
  • No breaking change

Note:
Run cargo add rust_iso3166 -F serde to enable the feature

Direct deserialization of numeric codes is not currently supported

Close #13

- Implement Serialize/Deserialize for ISO3166-2 and ISO3166-3
- Improve code by cargo fmt
- Fix clippy warning
- Add serde round-trip tests to ensure correctness
@zhangjiayin
Copy link
Contributor

These files are generated from scripts/iso3166_2.py, scripts/iso3166_3.py, and scripts/lib.py, so their formatting should not be modified directly to avoid future maintenance issues.

Please update the corresponding generator scripts instead, run and test it , and then resubmit the PR.

Thank you very much!

@SandmeyerX
Copy link
Author

These files are generated from scripts/iso3166_2.py, scripts/iso3166_3.py, and scripts/lib.py, so their formatting should not be modified directly to avoid future maintenance issues.

@zhangjiayin Got it! I'll get on that right away

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.

Serde feature

2 participants