aboutsummaryrefslogtreecommitdiff
path: root/src/framework/standard/mod.rs
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2018-07-15 23:32:50 -0700
committerZeyla Hellyer <[email protected]>2018-07-15 23:33:59 -0700
commit9da766976929417c4b8f487f8ec05b6f8b3f43ef (patch)
tree83cfae143ad7c1c4423d5ac35bf71d6e0bc6b882 /src/framework/standard/mod.rs
parentSupport multiple prefixes for command-groups (#343) (diff)
downloadserenity-9da766976929417c4b8f487f8ec05b6f8b3f43ef.tar.xz
serenity-9da766976929417c4b8f487f8ec05b6f8b3f43ef.zip
Fix some clippy lints
Some lints were not resolved due to causing API changes. Most lints in the framework were left unfixed.
Diffstat (limited to 'src/framework/standard/mod.rs')
-rw-r--r--src/framework/standard/mod.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/framework/standard/mod.rs b/src/framework/standard/mod.rs
index 42da699..1d7158a 100644
--- a/src/framework/standard/mod.rs
+++ b/src/framework/standard/mod.rs
@@ -529,14 +529,12 @@ impl StandardFramework {
// Is there a custom check for when this bucket applies?
// If not, assert that it does always.
let apply = bucket.check.as_ref().map_or(true, |check| {
- let apply = feature_cache! {{
+ feature_cache! {{
let guild_id = message.guild_id;
(check)(context, guild_id, message.channel_id, message.author.id)
} else {
(check)(context, message.channel_id, message.author.id)
- }};
-
- apply
+ }}
});
if apply && rate_limit > 0i64 {
@@ -955,9 +953,9 @@ impl StandardFramework {
/// to alter help-commands.
pub fn customised_help<F>(mut self, f: HelpFunction, c: F) -> Self
where F: FnOnce(CreateHelpCommand) -> CreateHelpCommand {
- let a = c(CreateHelpCommand(HelpOptions::default(), f));
+ let res = c(CreateHelpCommand(HelpOptions::default(), f));
- self.help = Some(a.finish());
+ self.help = Some(res.finish());
self
}