diff options
| author | mat <git@matdoes.dev> | 2023-05-05 23:09:57 -0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-05-05 23:09:57 -0500 |
| commit | 12370ab07609bf78baef4ec2302fa4ba44317dae (patch) | |
| tree | 4fc8eecd79350cd06f52b7d3b5c166a0093fd10f /azalea-brigadier/src/context/parsed_command_node.rs | |
| parent | e4176937f0584a6bcc5aba15abb1e2df6ddf588d (diff) | |
| download | azalea-drasl-12370ab07609bf78baef4ec2302fa4ba44317dae.tar.xz | |
change some things to be Arc+RwLock in brigadier
Diffstat (limited to 'azalea-brigadier/src/context/parsed_command_node.rs')
| -rwxr-xr-x | azalea-brigadier/src/context/parsed_command_node.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/azalea-brigadier/src/context/parsed_command_node.rs b/azalea-brigadier/src/context/parsed_command_node.rs index ed49928d..bba5d121 100755 --- a/azalea-brigadier/src/context/parsed_command_node.rs +++ b/azalea-brigadier/src/context/parsed_command_node.rs @@ -1,10 +1,12 @@ +use parking_lot::RwLock; + use super::string_range::StringRange; use crate::tree::CommandNode; -use std::{cell::RefCell, rc::Rc}; +use std::sync::Arc; #[derive(Debug)] pub struct ParsedCommandNode<S> { - pub node: Rc<RefCell<CommandNode<S>>>, + pub node: Arc<RwLock<CommandNode<S>>>, pub range: StringRange, } |
