aboutsummaryrefslogtreecommitdiff
path: root/azalea-brigadier/src/context.rs
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-04-17 21:38:57 -0500
committermat <github@matdoes.dev>2022-04-17 21:38:57 -0500
commit1d28c7cfb5260b7c7905fb5561ffcc7ceead1b77 (patch)
tree5e37f4842d4ae107dd6ba627736299dea854a33a /azalea-brigadier/src/context.rs
parentd68233e0b1ff61d09ab2c4e22a42f3326054539b (diff)
downloadazalea-drasl-1d28c7cfb5260b7c7905fb5561ffcc7ceead1b77.tar.xz
forking stuff
Diffstat (limited to 'azalea-brigadier/src/context.rs')
-rw-r--r--azalea-brigadier/src/context.rs19
1 files changed, 17 insertions, 2 deletions
diff --git a/azalea-brigadier/src/context.rs b/azalea-brigadier/src/context.rs
index b798397b..4c36a32c 100644
--- a/azalea-brigadier/src/context.rs
+++ b/azalea-brigadier/src/context.rs
@@ -53,8 +53,6 @@ impl<S> CommandContextBuilder<S> {
command: None,
dispatcher,
nodes: vec![],
- // rootNode,
- // start,
child: None,
modifier: None,
forks: false,
@@ -157,6 +155,23 @@ impl<S> Clone for CommandContext<S> {
}
}
+impl<S> Debug for CommandContext<S> {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ f.debug_struct("CommandContext")
+ // .field("source", &self.source)
+ .field("input", &self.input)
+ // .field("arguments", &self.arguments)
+ // .field("command", &self.command)
+ // .field("root_node", &self.root_node)
+ // .field("nodes", &self.nodes)
+ .field("range", &self.range)
+ .field("child", &self.child)
+ // .field("modifier", &self.modifier)
+ .field("forks", &self.forks)
+ .finish()
+ }
+}
+
impl<S> CommandContext<S> {
pub fn copy_for(&self, source: Rc<S>) -> Self {
if Rc::ptr_eq(&source, &self.source) {