ardaku / whoami

Rust crate to get the current user and environment.
Apache License 2.0
195 stars 31 forks source link

Question: Why change to non-exhaustive language model? #116

Open alexipeck opened 2 months ago

alexipeck commented 2 months ago

Why move from whoami::lang() which returned a Vec to whoami::langs() which returns Vec if the enum Language isn't using close to an exhaustive list? Having only English, Spanish and __ to represent other's seems like it would further complicate language matching downstream.

AldaronLau commented 2 months ago

The plan is to eventually make the enum include all ISO 639-1 language codes, but has not been prioritized

AldaronLau commented 2 months ago

It is just an internal detail at the moment, usage should be fine using .to_string() for any language / country combination