From 1d28c7cfb5260b7c7905fb5561ffcc7ceead1b77 Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 17 Apr 2022 21:38:57 -0500 Subject: forking stuff --- azalea-brigadier/src/context.rs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'azalea-brigadier/src/context.rs') 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 CommandContextBuilder { command: None, dispatcher, nodes: vec![], - // rootNode, - // start, child: None, modifier: None, forks: false, @@ -157,6 +155,23 @@ impl Clone for CommandContext { } } +impl Debug for CommandContext { + 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 CommandContext { pub fn copy_for(&self, source: Rc) -> Self { if Rc::ptr_eq(&source, &self.source) { -- cgit v1.2.3