aboutsummaryrefslogtreecommitdiff
path: root/src/framework/help_commands.rs
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2017-06-06 10:39:15 -0700
committerZeyla Hellyer <[email protected]>2017-06-06 10:39:15 -0700
commit21d989cfe0b67882ab6f36d42a95e1736d9c0bf5 (patch)
tree28dd8bab62d421ded1b5d959f7348abf0f8b5753 /src/framework/help_commands.rs
parentMake User::direct_message/dm accept a builder (diff)
downloadserenity-21d989cfe0b67882ab6f36d42a95e1736d9c0bf5.tar.xz
serenity-21d989cfe0b67882ab6f36d42a95e1736d9c0bf5.zip
Clippy lints
Diffstat (limited to 'src/framework/help_commands.rs')
-rw-r--r--src/framework/help_commands.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/framework/help_commands.rs b/src/framework/help_commands.rs
index 3396f3c..a4dbe76 100644
--- a/src/framework/help_commands.rs
+++ b/src/framework/help_commands.rs
@@ -179,7 +179,7 @@ pub fn with_embeds(ctx: &mut Context,
for name in command_names {
let cmd = &commands[name];
-
+
if cmd.help_available {
let _ = write!(desc, "`{}`\n", name);
@@ -188,7 +188,7 @@ pub fn with_embeds(ctx: &mut Context,
}
if has_commands {
- e = e.field(|f| f.name(&group_name).value(&desc));
+ e = e.field(|f| f.name(group_name).value(&desc));
}
}
@@ -301,16 +301,16 @@ pub fn plain(ctx: &mut Context,
let commands = remove_aliases(&group.commands);
let mut command_names = commands.keys().collect::<Vec<_>>();
command_names.sort();
-
+
for name in command_names {
let cmd = &commands[name];
-
+
if cmd.help_available {
let _ = write!(group_help, "`{}` ", name);
}
}
- if group_help.len() > 0 {
+ if !group_help.is_empty() {
let _ = write!(result, "**{}:** ", group_name);
if let Some(ref x) = group.prefix {