From f825544e2776ab545ff0a9c674b68183120695cb Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 5 May 2023 23:23:11 -0500 Subject: CommandDispatcher is now Send+Sync --- azalea-brigadier/src/context/command_context.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 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 88af2002..1734bb05 100755 --- a/azalea-brigadier/src/context/command_context.rs +++ b/azalea-brigadier/src/context/command_context.rs @@ -9,15 +9,15 @@ use std::{any::Any, collections::HashMap, fmt::Debug, rc::Rc, sync::Arc}; /// A built `CommandContextBuilder`. pub struct CommandContext { - pub source: Rc, + pub source: Arc, pub input: String, pub arguments: HashMap, pub command: Command, pub root_node: Arc>>, pub nodes: Vec>, pub range: StringRange, - pub child: Option>>, - pub modifier: Option>>, + pub child: Option>>, + pub modifier: Option>>, pub forks: bool, } @@ -56,8 +56,8 @@ impl Debug for CommandContext { } impl CommandContext { - pub fn copy_for(&self, source: Rc) -> Self { - if Rc::ptr_eq(&source, &self.source) { + pub fn copy_for(&self, source: Arc) -> Self { + if Arc::ptr_eq(&source, &self.source) { return self.clone(); } CommandContext { -- cgit v1.2.3