aboutsummaryrefslogtreecommitdiff
path: root/azalea-brigadier/src/modifier.rs
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-04-17 20:46:43 -0500
committermat <github@matdoes.dev>2022-04-17 20:46:43 -0500
commitd68233e0b1ff61d09ab2c4e22a42f3326054539b (patch)
treed40d421eca3695fd594c1a0b1589af09c59e1f84 /azalea-brigadier/src/modifier.rs
parentaf4b0d0add23188ab00e89a216cd3db62074cf7e (diff)
downloadazalea-drasl-d68233e0b1ff61d09ab2c4e22a42f3326054539b.tar.xz
simplify the <S> generic so it's not an Rc
Diffstat (limited to 'azalea-brigadier/src/modifier.rs')
-rw-r--r--azalea-brigadier/src/modifier.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/azalea-brigadier/src/modifier.rs b/azalea-brigadier/src/modifier.rs
index 84528696..c1a9aaf0 100644
--- a/azalea-brigadier/src/modifier.rs
+++ b/azalea-brigadier/src/modifier.rs
@@ -4,6 +4,9 @@ use crate::{
context::CommandContext, exceptions::command_syntax_exception::CommandSyntaxException,
};
-pub trait RedirectModifier<S: Any + Clone> {
- fn apply(&self, context: &CommandContext<S>) -> Result<Vec<Rc<S>>, CommandSyntaxException>;
-}
+// pub trait RedirectModifier<S> {
+// fn apply(&self, context: &CommandContext<S>) -> Result<Vec<S>, CommandSyntaxException>;
+// }
+
+pub type RedirectModifier<S> =
+ dyn Fn(&CommandContext<S>) -> Result<Vec<Rc<S>>, CommandSyntaxException>;