aboutsummaryrefslogtreecommitdiff
path: root/azalea-brigadier
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2024-04-20 04:03:03 +0000
committermat <git@matdoes.dev>2024-04-20 04:03:03 +0000
commit8a1e1b7bb93373e85432ce4211b6ede4eae79409 (patch)
treec2803f0a1a6c22c0e4ab0f123f662f817ed7aaff /azalea-brigadier
parent6d9d1a456951ae321089343a91d15bfa9f3087d7 (diff)
downloadazalea-drasl-8a1e1b7bb93373e85432ce4211b6ede4eae79409.tar.xz
clippy
Diffstat (limited to 'azalea-brigadier')
-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
}