oauth error msg improvement, general code quality

This commit is contained in:
lewis
2026-01-11 22:33:41 +02:00
parent d1902506a5
commit 16fb4dbd03
27 changed files with 676 additions and 469 deletions
+4 -5
View File
@@ -182,11 +182,10 @@ static STRINGS_FI: NotificationStrings = NotificationStrings {
};
pub fn format_message(template: &str, vars: &[(&str, &str)]) -> String {
let mut result = template.to_string();
for (key, value) in vars {
result = result.replace(&format!("{{{}}}", key), value);
}
result
vars.iter()
.fold(template.to_string(), |result, (key, value)| {
result.replace(&format!("{{{}}}", key), value)
})
}
#[cfg(test)]