From 70b5097aaac85f970c32ceb988dbb5f5d575ee0f Mon Sep 17 00:00:00 2001 From: acdenisSK Date: Thu, 27 Jul 2017 08:10:41 +0200 Subject: Change the config a bit, and a few nitpicks --- src/framework/create_command.rs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/framework/create_command.rs') diff --git a/src/framework/create_command.rs b/src/framework/create_command.rs index d97f6fa..d2ae31f 100644 --- a/src/framework/create_command.rs +++ b/src/framework/create_command.rs @@ -65,8 +65,7 @@ impl CreateCommand { /// } /// ``` pub fn check(mut self, check: F) -> Self - where - F: Fn(&mut Context, &Message, &Arc) -> bool + Send + Sync + 'static, { + where F: Fn(&mut Context, &Message, &Arc) -> bool + Send + Sync + 'static { self.0.checks.push(Box::new(check)); self @@ -100,8 +99,10 @@ impl CreateCommand { /// /// [`exec_str`]: #method.exec_str pub fn exec(mut self, func: F) -> Self - where - F: Fn(&mut Context, &Message, Vec) -> Result<(), String> + Send + Sync + 'static, { + where F: Fn(&mut Context, &Message, Vec) -> Result<(), String> + + Send + + Sync + + 'static { self.0.exec = CommandType::Basic(Box::new(func)); self @@ -113,12 +114,9 @@ impl CreateCommand { /// /// You can return `Err(string)` if there's an error. pub fn exec_help(mut self, f: F) -> Self - where - F: Fn(&mut Context, &Message, HashMap>, &[String]) - -> Result<(), String> - + Send - + Sync - + 'static, { + where F: Fn(&mut Context, &Message, HashMap>, &[String]) + -> Result<(), String> + + 'static { self.0.exec = CommandType::WithCommands(Box::new(f)); self -- cgit v1.2.3