aboutsummaryrefslogtreecommitdiff
path: root/azalea-brigadier/src/tree
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2023-10-12 20:18:53 -0500
committermat <git@matdoes.dev>2023-10-12 20:18:53 -0500
commitd82230a427847e17ed4ce105022a3c89b1d9bc6a (patch)
treeba1186c1b8c8ceff4a3a35971f7cbd534d174ff9 /azalea-brigadier/src/tree
parent38db231ea8fa0fb223e16637db0b6ec65b2b81ef (diff)
downloadazalea-drasl-d82230a427847e17ed4ce105022a3c89b1d9bc6a.tar.xz
less Arc<S> in brigadier
Diffstat (limited to 'azalea-brigadier/src/tree')
-rwxr-xr-xazalea-brigadier/src/tree/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/azalea-brigadier/src/tree/mod.rs b/azalea-brigadier/src/tree/mod.rs
index 8ab3526e..be2efef1 100755
--- a/azalea-brigadier/src/tree/mod.rs
+++ b/azalea-brigadier/src/tree/mod.rs
@@ -31,7 +31,7 @@ pub struct CommandNode<S> {
pub arguments: HashMap<String, Arc<RwLock<CommandNode<S>>>>,
pub command: Command<S>,
- pub requirement: Arc<dyn Fn(Arc<S>) -> bool + Send + Sync>,
+ pub requirement: Arc<dyn Fn(&S) -> bool + Send + Sync>,
pub redirect: Option<Arc<RwLock<CommandNode<S>>>>,
pub forks: bool,
pub modifier: Option<Arc<RedirectModifier<S>>>,
@@ -97,7 +97,7 @@ impl<S> CommandNode<S> {
}
}
- pub fn can_use(&self, source: Arc<S>) -> bool {
+ pub fn can_use(&self, source: &S) -> bool {
(self.requirement)(source)
}