generated from GarandPLG/rust-flake-template
Add lifetime parameter and MarkedCells struct
Refactor App, GameStates, SkirmishState and BoardState to carry a generic lifetime `'a`. Introduce a new `MarkedCells` type that holds marking state and selected unit, replacing the previous `marking_cells` flag and raw deque. Update related methods, keybindings, view implementations and module exports to use the new structures.
This commit is contained in:
@@ -33,7 +33,9 @@ fn main_menu_layout(area: Rect) -> [Rect; 2] {
|
||||
}
|
||||
|
||||
pub fn main_menu_view(app: &App, area: Rect, buf: &mut Buffer) {
|
||||
let Some(states) = app.states() else { return };
|
||||
let Some(states) = app.states_ref() else {
|
||||
return;
|
||||
};
|
||||
|
||||
let [main_menu_area, keybindings_area] = main_menu_layout(area);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user