From ff4437addb01e5c6c3ad8c5b1830db0d0a86396b Mon Sep 17 00:00:00 2001 From: Zeyla Hellyer Date: Tue, 18 Apr 2017 21:21:30 -0700 Subject: Accept a slice of args in help commands The help commands don't actually need to have the arguments passed by value, so passing them by reference is fine. --- src/ext/framework/create_command.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ext/framework/create_command.rs') diff --git a/src/ext/framework/create_command.rs b/src/ext/framework/create_command.rs index 7f2c25f..512e82c 100644 --- a/src/ext/framework/create_command.rs +++ b/src/ext/framework/create_command.rs @@ -112,7 +112,7 @@ impl CreateCommand { /// /// You can return `Err(string)` if there's an error. pub fn exec_help(mut self, f: F) -> Self - where F: Fn(&mut Context, &Message, HashMap>, Vec) -> Result<(), String> + Send + Sync + 'static { + where F: Fn(&mut Context, &Message, HashMap>, &[String]) -> Result<(), String> + Send + Sync + 'static { self.0.exec = CommandType::WithCommands(Box::new(f)); self -- cgit v1.2.3