aboutsummaryrefslogtreecommitdiff
path: root/src/framework/standard/create_command.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/framework/standard/create_command.rs')
-rw-r--r--src/framework/standard/create_command.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/framework/standard/create_command.rs b/src/framework/standard/create_command.rs
index 546447e..a8421e6 100644
--- a/src/framework/standard/create_command.rs
+++ b/src/framework/standard/create_command.rs
@@ -11,9 +11,9 @@ pub struct CreateCommand(pub Command);
impl CreateCommand {
/// Adds multiple aliases.
pub fn batch_known_as(mut self, names: Vec<&str>) -> Self {
- self.0.aliases.extend(
- names.into_iter().map(|n| n.to_owned()),
- );
+ self.0
+ .aliases
+ .extend(names.into_iter().map(|n| n.to_owned()));
self
}
@@ -115,10 +115,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>>,
- Args)
+ where F: Fn(&mut Context, &Message, HashMap<String, Arc<CommandGroup>>, Args)
-> Result<(), String>
+ 'static {
self.0.exec = CommandType::WithCommands(Box::new(f));