diff --git a/src/ui/rm/widget/window.rs b/src/ui/rm/widget/window.rs index 75d61b4d..1f59e1e9 100644 --- a/src/ui/rm/widget/window.rs +++ b/src/ui/rm/widget/window.rs @@ -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 }