bin/ui: Simplify impl of ShortcutsProps::shortcuts()

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer
2025-12-09 13:17:57 +01:00
committed by Erik Kundt
parent 02dc8e9a34
commit 2f4576c989
+5 -3
View File
@@ -217,9 +217,11 @@ impl ShortcutsProps {
pub fn shortcuts(mut self, shortcuts: &[(&str, &str)]) -> Self {
self.shortcuts.clear();
for (short, long) in shortcuts {
self.shortcuts.push((short.to_string(), long.to_string()));
}
self.shortcuts.extend(
shortcuts
.iter()
.map(|(s, l)| (s.to_string(), l.to_string())),
);
self
}