mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-10 15:57:53 +00:00
refactor(commands): move tree branch construct code into type method
This commit is contained in:
parent
c43a855184
commit
3120e62dda
2 changed files with 8 additions and 5 deletions
|
|
@ -10,6 +10,13 @@ pub struct TreeBranch {
|
|||
}
|
||||
|
||||
impl TreeBranch {
|
||||
pub fn empty() -> Self {
|
||||
Self {
|
||||
current_command_key: None,
|
||||
branches: OrderMap::new(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn register_command(&mut self, command: Command) {
|
||||
let mut current_branch = self;
|
||||
// iterate over tokens in command
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue