refactor(commands): clearer token match typing, make tree.possible_commads return iterator instead of traversing the whole tree immediately

This commit is contained in:
dusk 2025-01-12 04:23:46 +09:00
parent 877592588c
commit d5c271be20
No known key found for this signature in database
4 changed files with 125 additions and 102 deletions

View file

@ -18,7 +18,7 @@ pub mod server_config;
pub mod switch;
pub mod system;
use std::fmt::Display;
use std::fmt::{Debug, Display};
use smol_str::SmolStr;
@ -27,7 +27,7 @@ use crate::{
token::{ToToken, Token},
};
#[derive(Clone, Debug)]
#[derive(Debug, Clone)]
pub struct Command {
// TODO: fix hygiene
pub tokens: Vec<Token>,