From 9b53582f5e5e9650abda4106124e7f9f4e78a90c Mon Sep 17 00:00:00 2001 From: Zeyla Hellyer Date: Sat, 16 Dec 2017 13:24:09 -0800 Subject: Fix most clippy lints, take more refeernces Fix clippy lints and subsequently accept references for more function parameters. --- src/framework/standard/command.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/framework/standard/command.rs') diff --git a/src/framework/standard/command.rs b/src/framework/standard/command.rs index be0196c..5138596 100644 --- a/src/framework/standard/command.rs +++ b/src/framework/standard/command.rs @@ -13,7 +13,7 @@ pub type Check = Fn(&mut Context, &Message, &mut Args, &CommandOptions) -> bool + Sync + 'static; -pub type HelpFunction = fn(&mut Context, &Message, &HelpOptions, HashMap>, Args) +pub type HelpFunction = fn(&mut Context, &Message, &HelpOptions, HashMap>, &Args) -> Result<(), Error>; pub struct Help(pub HelpFunction, pub Arc); @@ -25,7 +25,7 @@ impl Debug for Help { } impl HelpCommand for Help { - fn execute(&self, c: &mut Context, m: &Message, ho: &HelpOptions,hm: HashMap>, a: Args) -> Result<(), Error> { + fn execute(&self, c: &mut Context, m: &Message, ho: &HelpOptions,hm: HashMap>, a: &Args) -> Result<(), Error> { (self.0)(c, m, ho, hm, a) } } @@ -176,7 +176,7 @@ pub struct HelpOptions { } pub trait HelpCommand: Send + Sync + 'static { - fn execute(&self, &mut Context, &Message, &HelpOptions, HashMap>, Args) -> Result<(), Error>; + fn execute(&self, &mut Context, &Message, &HelpOptions, HashMap>, &Args) -> Result<(), Error>; fn options(&self) -> Arc { Arc::clone(&DEFAULT_OPTIONS) @@ -184,7 +184,7 @@ pub trait HelpCommand: Send + Sync + 'static { } impl HelpCommand for Arc { - fn execute(&self, c: &mut Context, m: &Message, ho: &HelpOptions, hm: HashMap>, a: Args) -> Result<(), Error> { + fn execute(&self, c: &mut Context, m: &Message, ho: &HelpOptions, hm: HashMap>, a: &Args) -> Result<(), Error> { (**self).execute(c, m, ho, hm, a) } } -- cgit v1.2.3