From d68233e0b1ff61d09ab2c4e22a42f3326054539b Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 17 Apr 2022 20:46:43 -0500 Subject: simplify the generic so it's not an Rc --- azalea-brigadier/src/modifier.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'azalea-brigadier/src/modifier.rs') 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 { - fn apply(&self, context: &CommandContext) -> Result>, CommandSyntaxException>; -} +// pub trait RedirectModifier { +// fn apply(&self, context: &CommandContext) -> Result, CommandSyntaxException>; +// } + +pub type RedirectModifier = + dyn Fn(&CommandContext) -> Result>, CommandSyntaxException>; -- cgit v1.2.3