diff options
Diffstat (limited to 'locale')
| -rw-r--r-- | locale/tools/src/main.rs | 8 | 
1 files changed, 3 insertions, 5 deletions
| diff --git a/locale/tools/src/main.rs b/locale/tools/src/main.rs index a6232dda..2f8c9718 100644 --- a/locale/tools/src/main.rs +++ b/locale/tools/src/main.rs @@ -61,11 +61,9 @@ static NATIVE_LANGUAGE_NAMES: &[(&str, &str)] = &[  fn export_load(inputs: &[PathBuf]) -> Result<BTreeMap<String, String>> {      let mut ini = BTreeMap::new();      for path in inputs { -        let f = load_ini(&path)?; +        let f = load_ini(path)?;          for (k, v) in f { -            if !ini.contains_key(&k) { -                ini.insert(k, v); -            } +            ini.entry(k).or_insert(v);          }      }      for &(code, name) in NATIVE_LANGUAGE_NAMES { @@ -162,7 +160,7 @@ msgstr ""                              a,                              "{k},{}",                              v.values() -                                .map(|s| serde_json::to_string(s)) +                                .map(serde_json::to_string)                                  .try_collect::<Vec<_>>()?                                  .join(",")                          )?; | 
