1 use rustc_data_structures::fx::FxHashMap;
5 descriptions: FxHashMap<&'static str, &'static str>,
9 pub fn new(descriptions: &[(&'static str, &'static str)]) -> Registry {
10 Registry { descriptions: descriptions.iter().cloned().collect() }
13 pub fn find_description(&self, code: &str) -> Option<&'static str> {
14 self.descriptions.get(code).cloned()