|
|
@ -2346,10 +2346,10 @@ mod cmd {
|
|
|
|
|
|
|
|
|
|
|
|
pub static COMMANDS: Lazy<HashMap<&'static str, &'static TypableCommand>> = Lazy::new(|| {
|
|
|
|
pub static COMMANDS: Lazy<HashMap<&'static str, &'static TypableCommand>> = Lazy::new(|| {
|
|
|
|
TYPABLE_COMMAND_LIST
|
|
|
|
TYPABLE_COMMAND_LIST
|
|
|
|
.into_iter()
|
|
|
|
.iter()
|
|
|
|
.flat_map(|cmd| {
|
|
|
|
.flat_map(|cmd| {
|
|
|
|
std::iter::once((cmd.name, cmd))
|
|
|
|
std::iter::once((cmd.name, cmd))
|
|
|
|
.chain(cmd.aliases.into_iter().map(move |&alias| (alias, cmd)))
|
|
|
|
.chain(cmd.aliases.iter().map(move |&alias| (alias, cmd)))
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.collect()
|
|
|
|
.collect()
|
|
|
|
});
|
|
|
|
});
|
|
|
|