aboutsummaryrefslogtreecommitdiff
path: root/azalea-brigadier/src/context
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-brigadier/src/context')
-rwxr-xr-xazalea-brigadier/src/context/command_context_builder.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/azalea-brigadier/src/context/command_context_builder.rs b/azalea-brigadier/src/context/command_context_builder.rs
index 75295825..95e1b5d8 100755
--- a/azalea-brigadier/src/context/command_context_builder.rs
+++ b/azalea-brigadier/src/context/command_context_builder.rs
@@ -63,7 +63,7 @@ impl<'a, S> CommandContextBuilder<'a, S> {
}
pub fn with_command(&mut self, command: &Command<S>) -> &Self {
- self.command = command.clone();
+ self.command.clone_from(command);
self
}
pub fn with_child(&mut self, child: Rc<CommandContextBuilder<'a, S>>) -> &Self {
@@ -80,7 +80,7 @@ impl<'a, S> CommandContextBuilder<'a, S> {
range,
});
self.range = StringRange::encompassing(&self.range, &range);
- self.modifier = node.read().modifier.clone();
+ self.modifier.clone_from(&node.read().modifier);
self.forks = node.read().forks;
self
}