generated from GarandPLG/rust-flake-template
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:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user