From cc4fe62fc82842e0bde628437a45d55c6a82f1f3 Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 11 Jan 2022 00:01:47 -0600 Subject: adfsfasdfaSDQAWERTERYTUYghyubnjnrdfxcv etgvbhy0ujn- --- azalea-brigadier/src/context/command_context.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'azalea-brigadier/src/context/command_context.rs') diff --git a/azalea-brigadier/src/context/command_context.rs b/azalea-brigadier/src/context/command_context.rs index 36741906..68144a40 100644 --- a/azalea-brigadier/src/context/command_context.rs +++ b/azalea-brigadier/src/context/command_context.rs @@ -14,17 +14,20 @@ pub struct CommandContext<'a, S, T> { command: &'a dyn Command, arguments: HashMap>, root_node: &'a dyn CommandNode, - nodes: Vec>, + nodes: Vec>, range: StringRange, - child: Option>, + child: Option<&'a CommandContext<'a, S, T>>, modifier: Option<&'a dyn RedirectModifier>, forks: bool, } -impl CommandContext<'_, S, T> { +impl CommandContext<'_, S, T> +where + S: PartialEq, +{ pub fn clone_for(&self, source: S) -> Self { if self.source == source { - return self.clone(); + return *self; } Self { source, -- cgit v1.2.3