diff options
| author | mat <github@matdoes.dev> | 2022-07-31 18:05:41 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-07-31 18:05:41 -0500 |
| commit | 69f97dbf02e5422ee796492a3633a4e8f3f09d2d (patch) | |
| tree | 0727d5dd604e49135e2265690856c36ce28792e4 /azalea-brigadier/src/context/command_context.rs | |
| parent | 0cf8f82994db643e13ec90074bd1c2c92c6e67fb (diff) | |
| download | azalea-drasl-69f97dbf02e5422ee796492a3633a4e8f3f09d2d.tar.xz | |
clippo the sequel
Diffstat (limited to 'azalea-brigadier/src/context/command_context.rs')
| -rwxr-xr-x | azalea-brigadier/src/context/command_context.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/azalea-brigadier/src/context/command_context.rs b/azalea-brigadier/src/context/command_context.rs index 1834a73d..98609a6e 100755 --- a/azalea-brigadier/src/context/command_context.rs +++ b/azalea-brigadier/src/context/command_context.rs @@ -1,5 +1,8 @@ use super::{parsed_command_node::ParsedCommandNode, string_range::StringRange, ParsedArgument}; -use crate::{modifier::RedirectModifier, tree::CommandNode}; +use crate::{ + modifier::RedirectModifier, + tree::{Command, CommandNode}, +}; use std::{any::Any, cell::RefCell, collections::HashMap, fmt::Debug, rc::Rc}; /// A built `CommandContextBuilder`. @@ -7,7 +10,7 @@ pub struct CommandContext<S> { pub source: Rc<S>, pub input: String, pub arguments: HashMap<String, ParsedArgument>, - pub command: Option<Rc<dyn Fn(&CommandContext<S>) -> i32>>, + pub command: Command<S>, pub root_node: Rc<RefCell<CommandNode<S>>>, pub nodes: Vec<ParsedCommandNode<S>>, pub range: StringRange, |
