aboutsummaryrefslogtreecommitdiff
path: root/azalea-brigadier/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-brigadier/src')
-rwxr-xr-xazalea-brigadier/src/command_dispatcher.rs5
-rwxr-xr-xazalea-brigadier/src/lib.rs2
2 files changed, 3 insertions, 4 deletions
diff --git a/azalea-brigadier/src/command_dispatcher.rs b/azalea-brigadier/src/command_dispatcher.rs
index eab42dd8..6d1f28b1 100755
--- a/azalea-brigadier/src/command_dispatcher.rs
+++ b/azalea-brigadier/src/command_dispatcher.rs
@@ -159,7 +159,6 @@ impl<S> CommandDispatcher<S> {
}
pub fn add_paths(
- &self,
node: Rc<RefCell<CommandNode<S>>>,
result: &mut Vec<Vec<Rc<RefCell<CommandNode<S>>>>>,
parents: Vec<Rc<RefCell<CommandNode<S>>>>,
@@ -169,14 +168,14 @@ impl<S> CommandDispatcher<S> {
result.push(current.clone());
for child in node.borrow().children.values() {
- self.add_paths(child.clone(), result, current.clone());
+ Self::add_paths(child.clone(), result, current.clone());
}
}
pub fn get_path(&self, target: CommandNode<S>) -> Vec<String> {
let rc_target = Rc::new(RefCell::new(target));
let mut nodes: Vec<Vec<Rc<RefCell<CommandNode<S>>>>> = Vec::new();
- self.add_paths(self.root.clone(), &mut nodes, vec![]);
+ Self::add_paths(self.root.clone(), &mut nodes, vec![]);
for list in nodes {
if *list.last().expect("Nothing in list").borrow() == *rc_target.borrow() {
diff --git a/azalea-brigadier/src/lib.rs b/azalea-brigadier/src/lib.rs
index c2ac7e14..3c37b7f3 100755
--- a/azalea-brigadier/src/lib.rs
+++ b/azalea-brigadier/src/lib.rs
@@ -7,5 +7,5 @@ pub mod message;
pub mod modifier;
pub mod parse_results;
pub mod string_reader;
-pub mod tree;
pub mod suggestion;
+pub mod tree;