aboutsummaryrefslogtreecommitdiff
path: root/azalea-brigadier/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-brigadier/src')
-rwxr-xr-xazalea-brigadier/src/command_dispatcher.rs21
1 files changed, 8 insertions, 13 deletions
diff --git a/azalea-brigadier/src/command_dispatcher.rs b/azalea-brigadier/src/command_dispatcher.rs
index 15648b42..eaf4a5e0 100755
--- a/azalea-brigadier/src/command_dispatcher.rs
+++ b/azalea-brigadier/src/command_dispatcher.rs
@@ -288,21 +288,16 @@ impl<S> CommandDispatcher<S> {
next.push(child.copy_for(context.source.clone()));
}
}
- } else {
- match &context.command {
- Some(context_command) => {
- found_command = true;
+ } else if let Some(context_command) = &context.command {
+ found_command = true;
- let value = context_command(context);
- result += value;
- // consumer.on_command_complete(context, true, value);
- successful_forks += 1;
+ let value = context_command(context);
+ result += value;
+ // consumer.on_command_complete(context, true, value);
+ successful_forks += 1;
- // TODO: allow context_command to error and handle
- // those errors
- }
- _ => {}
- }
+ // TODO: allow context_command to error and handle
+ // those errors
}
}