aboutsummaryrefslogtreecommitdiff
path: root/server/locale-export/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/locale-export/src/main.rs')
-rw-r--r--server/locale-export/src/main.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/server/locale-export/src/main.rs b/server/locale-export/src/main.rs
index 23823716..50cfe9eb 100644
--- a/server/locale-export/src/main.rs
+++ b/server/locale-export/src/main.rs
@@ -1,9 +1,9 @@
-use anyhow::{anyhow, Context, Result};
+use anyhow::{Context, Result, anyhow};
use clap::Parser;
use std::{
collections::BTreeMap,
fmt::Write as W2,
- fs::{read_to_string, File},
+ fs::{File, read_to_string},
io::Write,
path::{Path, PathBuf},
};
@@ -105,10 +105,10 @@ msgstr ""
.to_string_lossy(),
ini.into_iter()
.try_fold(String::new(), |mut a, (mut key, value)| {
- if let Some(id_map) = &id_map {
- if let Some(new_id) = id_map.get(&key) {
- key = new_id.to_owned()
- }
+ if let Some(id_map) = &id_map
+ && let Some(new_id) = id_map.get(&key)
+ {
+ key = new_id.to_owned()
}
let key = serde_json::to_string(&key)?;
let value = serde_json::to_string(&value)?;