mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-11 08:10:10 +00:00
refactor(commands): also use smolstr for commands themselves
This commit is contained in:
parent
af523a4c23
commit
b9867e7ea3
3 changed files with 12 additions and 8 deletions
|
|
@ -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>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue