diff --git a/src/command/join.rs b/src/command/join.rs index dc3aee9..8370827 100644 --- a/src/command/join.rs +++ b/src/command/join.rs @@ -142,7 +142,7 @@ pub async fn handle(state: State, interaction: Interaction) { .update_response( &interaction.token, ).embeds(Some(&[ - EmbedBuilder::new().title("Joined VC with intent to record").description(&format!("This bot joined {channel_mention} and intends to start recording after a responsible disclosure and consent.")).validate().unwrap().build() + EmbedBuilder::new().title("Joined VC with intent to record").description(format!("This bot joined {channel_mention} and intends to start recording after a responsible disclosure and consent.")).validate().unwrap().build() ])) .await .expect("TODO"); diff --git a/src/command/mod.rs b/src/command/mod.rs index 1083702..6044a24 100644 --- a/src/command/mod.rs +++ b/src/command/mod.rs @@ -47,7 +47,7 @@ pub struct Router { } impl Router { - fn add_route<'s, 'a, Fut, Handler>(&'s mut self, name: &'a str, handler: Handler) + fn add_route(&mut self, name: &str, handler: Handler) where Fut: Future + Send + 'static, Handler: Fn(State, Interaction) -> Fut + 'static, @@ -55,7 +55,7 @@ impl Router { self.add_route_already_boxed(name, box_handler(handler)); } - fn add_route_already_boxed<'s, 'a>(&'s mut self, name: &'a str, boxed_handler: BoxedHandler) { + fn add_route_already_boxed(&mut self, name: &str, boxed_handler: BoxedHandler) { self.map.insert(name, boxed_handler); } diff --git a/src/one_to_many_with_data.rs b/src/one_to_many_with_data.rs index b6342c4..c1ee244 100644 --- a/src/one_to_many_with_data.rs +++ b/src/one_to_many_with_data.rs @@ -66,7 +66,7 @@ where pub fn remove_left(&mut self, left: &Left) -> Option<(Left, BTreeMap)> { let (left, rights) = self.left_to_rights.remove_entry(left)?; - for (right, _right_data) in &rights { + for right in rights.keys() { self.right_to_left.remove(right); } diff --git a/src/track_vcs.rs b/src/track_vcs.rs index 7aeddb1..48dfe54 100644 --- a/src/track_vcs.rs +++ b/src/track_vcs.rs @@ -1,14 +1,5 @@ -type VCsInGuild = OneToManyUniqueBTreeMapWithData, Id, UserInVCData>; - -pub type VCs = DashMap, VCsInGuild>; - -use std::collections::BTreeMap; - use dashmap::DashMap; -use futures::{ - StreamExt, - stream::{self, FuturesUnordered}, -}; +use futures::{StreamExt, stream::FuturesUnordered}; use twilight_model::{ gateway::payload::incoming::VoiceStateUpdate, id::{ @@ -19,6 +10,10 @@ use twilight_model::{ use crate::{OneToManyUniqueBTreeMapWithData, UserInVCData, VoiceStatus}; +type VCsInGuild = OneToManyUniqueBTreeMapWithData, Id, UserInVCData>; + +pub type VCs = DashMap, VCsInGuild>; + #[tracing::instrument(skip(discord_client), ret)] async fn initialize_user_in_vc( discord_client: &twilight_http::Client,