I'm trying to set a constant, predefined hash map in Rust. I'm not sure what the best practice is in Rust for this.
use std::collections::HashMap;
pub const Countries: HashMap<&str, &str> = [
("UK", "United Kingdom"),
("US", "United States")
].iter().cloned().collect();
These will then be referenced later in the library.
If this is bad, I'm guessing a match in a function is the best way?