Menus: name the kept letters' type (clippy type_complexity)

Part of storytold/photocraft#15493.
This commit is contained in:
David Mann
2026-11-17 22:47:34 +01:00
parent 2d52fc0a0b
commit 8c31476bd3
+4 -1
View File
@@ -41,6 +41,9 @@ struct OpenSubmenu {
rect: Option<Rect>,
}
/// A level's letters (each row's mnemonic, or none) with the folder and labels they were assigned for.
type KeptLetters = (Folder, Vec<String>, Vec<Option<(char, usize)>>);
#[derive(Default)]
struct LevelState {
/// The rows of the pass `pass`, in the order they registered.
@@ -68,7 +71,7 @@ struct LevelState {
/// The last assignment of letters, with the labels and folder it was made for. Every row of a level asks for its
/// letter in every pass, and assigning them all for each row made opening a long menu or submenu cost many times
/// a plain row's frame: the letters are assigned again only when the labels or the folder change.
letters: Option<(Folder, Vec<String>, Vec<Option<(char, usize)>>)>,
letters: Option<KeptLetters>,
}
impl LevelState {