aboutsummaryrefslogtreecommitdiff
path: root/src/framework/standard/create_command.rs
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2017-09-18 17:48:52 -0700
committerZeyla Hellyer <[email protected]>2017-09-18 17:48:52 -0700
commitdae2cb77b407044f44a7a2790d93efba3891854e (patch)
treebef263c4490536cf8b56e988e71dd1aa43bc2696 /src/framework/standard/create_command.rs
parentFix compiles of a variety of feature combinations (diff)
downloadserenity-dae2cb77b407044f44a7a2790d93efba3891854e.tar.xz
serenity-dae2cb77b407044f44a7a2790d93efba3891854e.zip
Apply rustfmt
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));