Skip to content

Commit

Permalink
Implement suggestions from clippy & remove clippy arg max config (#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
Flat authored and arqunis committed Jun 3, 2019
1 parent ddf7a3f commit 6586830
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
1 change: 0 additions & 1 deletion clippy.toml
Expand Up @@ -5,4 +5,3 @@ doc-valid-idents = [
]
enum-variant-name-threshold = 1
single-char-binding-names-threshold = 3
too-many-arguments-threshold = 6
24 changes: 12 additions & 12 deletions src/framework/standard/help_commands.rs
Expand Up @@ -736,20 +736,20 @@ pub fn searched_lowercase<'a>(
)
};
let mut progressed = is_prefixless_group;
let is_word_prefix = group
.options
.prefixes
.iter()
.any(|prefix| {
if starts_with_whole_word(&searched_named_lowercase, &prefix) {
searched_named_lowercase.drain(..=prefix.len());
progressed = true;
}

if is_prefixless_group
|| group
.options
.prefixes
.iter()
.any(|prefix| {
if starts_with_whole_word(&searched_named_lowercase, &prefix) {
searched_named_lowercase.drain(..=prefix.len());
progressed = true;
}
prefix == searched_named_lowercase
});

prefix == &searched_named_lowercase
})
if is_prefixless_group || is_word_prefix
{
let single_group =
create_single_group(&context, &group, owners, &msg, &help_options);
Expand Down
3 changes: 1 addition & 2 deletions src/model/channel/guild_channel.rs
Expand Up @@ -730,8 +730,7 @@ impl GuildChannel {
.voice_states
.values()
.filter_map(|v| {
v.channel_id.map_or(
None,
v.channel_id.and_then(
|c| {
if c == self.id {
guild.read().members.get(&v.user_id).cloned()
Expand Down

0 comments on commit 6586830

Please sign in to comment.