aboutsummaryrefslogtreecommitdiff
path: root/azalea-brigadier/src/context/command_context_builder.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2023-07-09 19:11:29 -0500
committerGitHub <noreply@github.com>2023-07-09 19:11:29 -0500
commitd1afd02aa84e7b4450c1607277f078eb2a0f1bf3 (patch)
treeefea9bb7ef7f2064f7c963fd88f394fecec6231b /azalea-brigadier/src/context/command_context_builder.rs
parentea8a8fccb6eb39c97f6cb69e11db5f7d0886172e (diff)
downloadazalea-drasl-d1afd02aa84e7b4450c1607277f078eb2a0f1bf3.tar.xz
Update to Bevy 0.11 (#94)
* update to bevy 0.11 * clippy --------- Co-authored-by: mat <git@matdoes.dev>
Diffstat (limited to 'azalea-brigadier/src/context/command_context_builder.rs')
-rwxr-xr-xazalea-brigadier/src/context/command_context_builder.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/azalea-brigadier/src/context/command_context_builder.rs b/azalea-brigadier/src/context/command_context_builder.rs
index 78088941..2fc8d4ac 100755
--- a/azalea-brigadier/src/context/command_context_builder.rs
+++ b/azalea-brigadier/src/context/command_context_builder.rs
@@ -9,7 +9,7 @@ use crate::{
modifier::RedirectModifier,
tree::{Command, CommandNode},
};
-use std::{collections::HashMap, fmt::Debug, sync::Arc};
+use std::{collections::HashMap, fmt::Debug, rc::Rc, sync::Arc};
pub struct CommandContextBuilder<'a, S> {
pub arguments: HashMap<String, ParsedArgument>,
@@ -18,7 +18,7 @@ pub struct CommandContextBuilder<'a, S> {
pub dispatcher: &'a CommandDispatcher<S>,
pub source: Arc<S>,
pub command: Command<S>,
- pub child: Option<Arc<CommandContextBuilder<'a, S>>>,
+ pub child: Option<Rc<CommandContextBuilder<'a, S>>>,
pub range: StringRange,
pub modifier: Option<Arc<RedirectModifier<S>>>,
pub forks: bool,
@@ -66,7 +66,7 @@ impl<'a, S> CommandContextBuilder<'a, S> {
self.command = command.clone();
self
}
- pub fn with_child(&mut self, child: Arc<CommandContextBuilder<'a, S>>) -> &Self {
+ pub fn with_child(&mut self, child: Rc<CommandContextBuilder<'a, S>>) -> &Self {
self.child = Some(child);
self
}
@@ -92,7 +92,7 @@ impl<'a, S> CommandContextBuilder<'a, S> {
nodes: self.nodes.clone(),
source: self.source.clone(),
command: self.command.clone(),
- child: self.child.clone().map(|c| Arc::new(c.build(input))),
+ child: self.child.clone().map(|c| Rc::new(c.build(input))),
range: self.range.clone(),
forks: self.forks,
modifier: self.modifier.clone(),