@@ -2,6 +2,7 @@ use crate::{
22 api,
33 state_machine:: { CharacterSet , StateMachine } ,
44} ;
5+ use indexmap:: IndexMap ;
56use reqwest:: blocking:: Client as HttpClient ;
67use serenity:: { model:: channel:: Message , prelude:: Context } ;
78use std:: { collections:: HashMap , sync:: Arc } ;
@@ -35,15 +36,15 @@ pub struct Args<'m> {
3536pub ( crate ) struct Commands {
3637 state_machine : StateMachine < Arc < Command > > ,
3738 client : HttpClient ,
38- menu : Option < HashMap < & ' static str , ( & ' static str , GuardFn ) > > ,
39+ menu : Option < IndexMap < & ' static str , ( & ' static str , GuardFn ) > > ,
3940}
4041
4142impl Commands {
4243 pub ( crate ) fn new ( ) -> Self {
4344 Self {
4445 state_machine : StateMachine :: new ( ) ,
4546 client : HttpClient :: new ( ) ,
46- menu : Some ( HashMap :: new ( ) ) ,
47+ menu : Some ( IndexMap :: new ( ) ) ,
4748 }
4849 }
4950
@@ -168,7 +169,7 @@ impl Commands {
168169 ) ;
169170 }
170171
171- pub ( crate ) fn menu ( & mut self ) -> Option < HashMap < & ' static str , ( & ' static str , GuardFn ) > > {
172+ pub ( crate ) fn menu ( & mut self ) -> Option < IndexMap < & ' static str , ( & ' static str , GuardFn ) > > {
172173 self . menu . take ( )
173174 }
174175
0 commit comments