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

Consider replacing hard-coded country_code mappings with external Rust crate #319

Open
rhigman opened this issue Dec 2, 2021 · 0 comments
Labels

Comments

@rhigman
Copy link
Member

rhigman commented Dec 2, 2021

The country_code enum added under #314 is a bespoke list of ISO 3166-1 alpha-3 codes with string conversions to English country names, but a more robust solution would have been to check if any existing Rust crates handle this mapping. Unsurprisingly, some do exist, e.g. https://docs.rs/iso3166-1.

This would require less manual updating as the ISO 3166-1 list (inevitably) changes, although it would give us less control over the representation of politically sensitive (or just overlong/over-formal) country names. I'm also not sure how (if) it would work for defining the database enum.

@rhigman rhigman added enhancement Improvement request discussion-needed labels Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant