Giter Club home page Giter Club logo

rust-iso / rust_iso3166 Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 3.0 675 KB

ISO 3166 is a standard published by the International Organization for Standardization (ISO) that defines codes for the names of countries, dependent territories, special areas of geographical interest, and their principal subdivisions (e.g., provinces or states). The official name of the standard is Codes for the representation of names of countries and their subdivisions.

Rust 97.92% Python 2.08%
iso-3166-1 iso-3166-2 rust iso-3166-3

rust_iso3166's People

Contributors

happysalada avatar zhangjiayin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

rust_iso3166's Issues

Crate API changes based on platform

For some reason, in WebAssembly builds the fields of CountryCode become private and instead have getter methods (so instead of .name you have to use .name()). I thought I was going crazy for a while because this is obviously not visible in the docs!

Is there a reason for this? This means that if the same code using this library is used in a wasm and a native application, it has to be feature gated to access fields in a different way, or do some kind of workaround with maybe a trait over the CountryCode field.

implement PartialEq

just a question, why is PartialEq not implemented for CountryCode, couldn't they be matched on their alpha2 representation ?
Am I missing something ?

Data pollution

Some of the country names are polluted by Wikipedia footnotes. For example, Afghanistan and Cyprus have their English names listed by this library as Afghanistan[b] and Cyprus[b] due to a footnote linking to naming disputes.

Missing `Ord` impl

Without Ord, CountryCode cannot be used in various data structures, such as BTreeSet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.