diff options
| author | acdenisSK <[email protected]> | 2017-07-27 06:42:48 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-07-27 07:30:23 +0200 |
| commit | 550030264952f0e0043b63f4582bb817ef8bbf37 (patch) | |
| tree | b921e2f78fd603a5ca671623083a32806fd16090 /src/framework/command.rs | |
| parent | Use a consistent indentation style (diff) | |
| download | serenity-550030264952f0e0043b63f4582bb817ef8bbf37.tar.xz serenity-550030264952f0e0043b63f4582bb817ef8bbf37.zip | |
rustfmt
Diffstat (limited to 'src/framework/command.rs')
| -rw-r--r-- | src/framework/command.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/framework/command.rs b/src/framework/command.rs index e75ee5e..1484891 100644 --- a/src/framework/command.rs +++ b/src/framework/command.rs @@ -1,12 +1,14 @@ use std::sync::Arc; use super::Configuration; -use ::client::Context; -use ::model::{Message, Permissions}; +use client::Context; +use model::{Message, Permissions}; use std::collections::HashMap; pub type Check = Fn(&mut Context, &Message, &Arc<Command>) -> bool + 'static; pub type Exec = Fn(&mut Context, &Message, Vec<String>) -> Result<(), String> + 'static; -pub type Help = Fn(&mut Context, &Message, HashMap<String, Arc<CommandGroup>>, &[String]) -> Result<(), String> + 'static; +pub type Help = Fn(&mut Context, &Message, HashMap<String, Arc<CommandGroup>>, &[String]) + -> Result<(), String> + + 'static; pub type BeforeHook = Fn(&mut Context, &Message, &String) -> bool + 'static; pub type AfterHook = Fn(&mut Context, &Message, &String, Result<(), String>) + 'static; pub(crate) type InternalCommand = Arc<Command>; @@ -67,7 +69,8 @@ pub struct Command { impl Command { pub fn new<F>(f: F) -> Self - where F: Fn(&mut Context, &Message, Vec<String>) -> Result<(), String> + 'static { + where + F: Fn(&mut Context, &Message, Vec<String>) -> Result<(), String> + 'static, { Command { aliases: Vec::new(), checks: Vec::default(), |