Skip to content

Instantly share code, notes, and snippets.

@AlbanMinassian
Created November 25, 2018 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlbanMinassian/24eafa8253f69a5ba961ed3144b0d6a5 to your computer and use it in GitHub Desktop.
Save AlbanMinassian/24eafa8253f69a5ba961ed3144b0d6a5 to your computer and use it in GitHub Desktop.
extern crate iso639_1;
use iso639_1::{Iso639_1, get_enum, get_code_iso639_3};
pub fn main() {
assert!(Iso639_1::Fr != Iso639_1::En);
assert!(get_enum("fr").unwrap() == Iso639_1::Fr);
assert!(get_code_iso639_3("fr").unwrap() == "fra");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment