mirror of
https://seed.radicle.dev/rad:z39mP9rQAaGmERfUMPULfPUi473tY.git
synced 2026-11-21 02:20:48 +08:00
bin/ui: Simplify impl of ShortcutsProps::shortcuts()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
committed by
Erik Kundt
parent
02dc8e9a34
commit
2f4576c989
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user