Skip to content

Commit

Permalink
Use static country references
Browse files Browse the repository at this point in the history
  • Loading branch information
leodutra committed Oct 26, 2020
1 parent fa21893 commit 2bef06c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "country-emoji"
edition = "2018"
version = "0.1.1"
version = "0.1.2"
description = "Converts between country names, ISO 3166-1 codes and flag emojis."
readme = "README.md"
keywords = ["emoji", "country", "flags", "ISO-3166-1", "BCP-47"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# country-emoji
# country-emoji

[![crate.io](https://img.shields.io/crates/v/country-emoji)](https://crates.io/crates/country-emoji)

Expand Down
4 changes: 2 additions & 2 deletions src/countries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,6 @@ lazy_static! {
Country { code: "ZW", names: vec!["Zimbabwe", "Zimbabwean"] },
];

pub (crate) static ref COUNTRIES_MAP: HashMap<&'static str, Country> =
COUNTRIES.iter().cloned().map(|country| (country.code, country)).collect();
pub (crate) static ref COUNTRIES_MAP: HashMap<&'static str, &'static Country> =
COUNTRIES.iter().map(|country| (country.code, country)).collect();
}

0 comments on commit 2bef06c

Please sign in to comment.