From 12370ab07609bf78baef4ec2302fa4ba44317dae Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 5 May 2023 23:09:57 -0500 Subject: change some things to be Arc+RwLock in brigadier --- azalea-brigadier/src/context/command_context.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 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 98609a6e..88af2002 100755 --- a/azalea-brigadier/src/context/command_context.rs +++ b/azalea-brigadier/src/context/command_context.rs @@ -1,9 +1,11 @@ +use parking_lot::RwLock; + use super::{parsed_command_node::ParsedCommandNode, string_range::StringRange, ParsedArgument}; use crate::{ modifier::RedirectModifier, tree::{Command, CommandNode}, }; -use std::{any::Any, cell::RefCell, collections::HashMap, fmt::Debug, rc::Rc}; +use std::{any::Any, collections::HashMap, fmt::Debug, rc::Rc, sync::Arc}; /// A built `CommandContextBuilder`. pub struct CommandContext { @@ -11,7 +13,7 @@ pub struct CommandContext { pub input: String, pub arguments: HashMap, pub command: Command, - pub root_node: Rc>>, + pub root_node: Arc>>, pub nodes: Vec>, pub range: StringRange, pub child: Option>>, -- cgit v1.2.3