diff options
| author | Zeyla Hellyer <[email protected]> | 2017-09-18 17:48:52 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-09-18 17:48:52 -0700 |
| commit | dae2cb77b407044f44a7a2790d93efba3891854e (patch) | |
| tree | bef263c4490536cf8b56e988e71dd1aa43bc2696 /src/framework/standard/create_command.rs | |
| parent | Fix compiles of a variety of feature combinations (diff) | |
| download | serenity-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.rs | 11 |
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)); |