aboutsummaryrefslogtreecommitdiff
path: root/src/util/mod.rs
diff options
context:
space:
mode:
authorNathan Perry <np@npry.dev>2025-12-17 19:19:59 -0500
committerNathan Perry <np@npry.dev>2025-12-17 20:36:40 -0500
commit13fcc8a263970e48999e7f9319876a6443a54ac5 (patch)
treee354247547aaabc12da3de21478f6680a4d8f991 /src/util/mod.rs
parentd9af3725c5b4b8df91671fd425b734ee30924d8e (diff)
clippy fixes
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()