chore: make improvements suggested by clippy

This commit is contained in:
2026-04-07 00:27:26 -04:00
parent 3897d1deb2
commit 1bd8b9b203
4 changed files with 9 additions and 14 deletions

View File

@@ -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");

View File

@@ -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<Fut, Handler>(&mut self, name: &str, handler: Handler)
where
Fut: Future<Output = Return> + 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);
}