aboutsummaryrefslogtreecommitdiff
path: root/src/ext/framework/create_command.rs
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2017-04-18 21:21:30 -0700
committerZeyla Hellyer <[email protected]>2017-04-19 14:53:32 -0700
commitff4437addb01e5c6c3ad8c5b1830db0d0a86396b (patch)
tree1aa48b22a111174172b97ee9b41998ac3656c73d /src/ext/framework/create_command.rs
parentRemove ChannelPinsAck/MessageAck events (diff)
downloadserenity-ff4437addb01e5c6c3ad8c5b1830db0d0a86396b.tar.xz
serenity-ff4437addb01e5c6c3ad8c5b1830db0d0a86396b.zip
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.
Diffstat (limited to 'src/ext/framework/create_command.rs')
-rw-r--r--src/ext/framework/create_command.rs2
1 files changed, 1 insertions, 1 deletions
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<F>(mut self, f: F) -> Self
- where F: Fn(&mut Context, &Message, HashMap<String, Arc<CommandGroup>>, Vec<String>) -> Result<(), String> + Send + Sync + 'static {
+ where F: Fn(&mut Context, &Message, HashMap<String, Arc<CommandGroup>>, &[String]) -> Result<(), String> + Send + Sync + 'static {
self.0.exec = CommandType::WithCommands(Box::new(f));
self