aboutsummaryrefslogtreecommitdiff
path: root/src/util/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/mod.rs')
-rw-r--r--src/util/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/mod.rs b/src/util/mod.rs
index db85a9b..2035054 100644
--- a/src/util/mod.rs
+++ b/src/util/mod.rs
@@ -212,7 +212,7 @@ pub fn voice_states_by_channel(ctx: PoiseContext<'_>) -> HashMap<ChannelId, Vec<
Some((id, x))
})
.fold(HashMap::new(), |mut acc, (id, state)| {
- acc.entry(id).or_insert_with(|| vec![]).push(state);
+ acc.entry(id).or_insert_with(Vec::new).push(state);
acc
})
@@ -228,7 +228,7 @@ pub fn best_voice_channel(ctx: PoiseContext<'_>) -> Option<ChannelId> {
}
let voice_states = voice_states_by_channel(ctx);
- let max_pop = voice_states.iter().map(|(_, states)| states.len()).max();
+ let max_pop = voice_states.values().map(|states| states.len()).max();
let matching_channels = voice_states
.iter()