@@ -5,17 +5,17 @@ use super::{ItemType, Menu};
55
66/// Holds a nested tree of Menus and remembers which menu within the tree we're
77/// currently looking at.
8- pub struct MenuManager < ' a , T > {
9- menu : Menu < ' a , T > ,
8+ pub struct MenuManager < ' a , C > {
9+ menu : Menu < ' a , C > ,
1010 /// Maximum four levels deep
1111 menu_index : [ Option < usize > ; 4 ] ,
1212}
1313
14- impl < ' a , T > MenuManager < ' a , T > {
14+ impl < ' a , C > MenuManager < ' a , C > {
1515 /// Create a new MenuManager.
1616 ///
1717 /// You will be at the top-level.
18- pub fn new ( menu : Menu < ' a , T > ) -> Self {
18+ pub fn new ( menu : Menu < ' a , C > ) -> Self {
1919 Self {
2020 menu,
2121 menu_index : [ None , None , None , None ] ,
@@ -53,7 +53,7 @@ impl<'a, T> MenuManager<'a, T> {
5353 ///
5454 /// Menus are nested. If `depth` is `None`, get the current menu. Otherwise
5555 /// if it is `Some(i)` get the menu at depth `i`.
56- pub fn get_menu ( & self , depth : Option < usize > ) -> & Menu < ' a , T > {
56+ pub fn get_menu ( & self , depth : Option < usize > ) -> & Menu < ' a , C > {
5757 let mut menu = & self . menu ;
5858
5959 let depth = depth. unwrap_or_else ( || self . depth ( ) ) ;
0 commit comments