Refactor keybindings widget and reorder Group enum

- Introduce `KeybindingsWidget::new(view)` constructor and remove the
  standalone `keybindings_widget` function.
- Update all imports and call sites to use `KeybindingsWidget` directly.
- Reorder `Group` enum to place `Quit` after `Select` and adjust its
  iterator accordingly.
This commit is contained in:
2026-03-12 22:47:22 +01:00
parent 073e70441f
commit 70a8ac348e
5 changed files with 44 additions and 40 deletions
+2 -2
View File
@@ -14,14 +14,14 @@ pub enum Action {
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum Group {
Quit,
Movement,
Select,
Quit,
}
impl Group {
pub fn iter() -> impl Iterator<Item = Group> {
[Group::Quit, Group::Movement, Group::Select]
[Group::Movement, Group::Select, Group::Quit]
.iter()
.copied()
}