From 3c2716bbaeb71eca8cb2c7fca0dfd0b00cd34ba5 Mon Sep 17 00:00:00 2001 From: acdenisSK Date: Sat, 22 Jul 2017 01:59:38 +0200 Subject: Remove the uneccessary function and `Send + Sync` bounds --- src/framework/command.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/framework/command.rs') diff --git a/src/framework/command.rs b/src/framework/command.rs index a1c25de..e75ee5e 100644 --- a/src/framework/command.rs +++ b/src/framework/command.rs @@ -4,13 +4,13 @@ use ::client::Context; use ::model::{Message, Permissions}; use std::collections::HashMap; -pub type Check = Fn(&mut Context, &Message, &Arc) -> bool + Send + Sync + 'static; -pub type Exec = Fn(&mut Context, &Message, Vec) -> Result<(), String> + Send + Sync + 'static; -pub type Help = Fn(&mut Context, &Message, HashMap>, &[String]) -> Result<(), String> + Send + Sync + 'static; -pub type BeforeHook = Fn(&mut Context, &Message, &String) -> bool + Send + Sync + 'static; -pub type AfterHook = Fn(&mut Context, &Message, &String, Result<(), String>) + Send + Sync + 'static; +pub type Check = Fn(&mut Context, &Message, &Arc) -> bool + 'static; +pub type Exec = Fn(&mut Context, &Message, Vec) -> Result<(), String> + 'static; +pub type Help = Fn(&mut Context, &Message, HashMap>, &[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; -pub type PrefixCheck = Fn(&mut Context, &Message) -> Option + Send + Sync + 'static; +pub type PrefixCheck = Fn(&mut Context, &Message) -> Option + 'static; pub enum CommandOrAlias { Alias(String), @@ -67,7 +67,7 @@ pub struct Command { impl Command { pub fn new(f: F) -> Self - where F: Fn(&mut Context, &Message, Vec) -> Result<(), String> + Send + Sync + 'static { + where F: Fn(&mut Context, &Message, Vec) -> Result<(), String> + 'static { Command { aliases: Vec::new(), checks: Vec::default(), -- cgit v1.2.3