refactor(commands): also use smolstr for commands themselves

This commit is contained in:
dusk 2025-01-04 07:43:55 +09:00
parent af523a4c23
commit b9867e7ea3
No known key found for this signature in database
3 changed files with 12 additions and 8 deletions

View file

@ -1,9 +1,11 @@
use smol_str::SmolStr;
use crate::{commands::Command, Token};
use std::{cmp::Ordering, collections::HashMap};
#[derive(Debug, Clone)]
pub struct TreeBranch {
pub current_command_key: Option<String>,
pub current_command_key: Option<SmolStr>,
/// branches.keys(), but sorted by specificity
pub possible_tokens: Vec<Token>,
pub branches: HashMap<Token, TreeBranch>,