diff --git a/cadency_core/src/client.rs b/cadency_core/src/client.rs index c50b648..197aa33 100644 --- a/cadency_core/src/client.rs +++ b/cadency_core/src/client.rs @@ -16,6 +16,7 @@ pub struct Cadency { } impl Cadency { + #[must_use] pub fn builder() -> CadencyBuilder { CadencyBuilder::default() } diff --git a/cadency_core/src/command.rs b/cadency_core/src/command.rs index cdb4cb9..ebab784 100644 --- a/cadency_core/src/command.rs +++ b/cadency_core/src/command.rs @@ -80,7 +80,7 @@ impl TypeMapKey for Commands { pub(crate) async fn setup_commands(ctx: &Context) -> Result<(), serenity::Error> { let commands = utils::get_commands(ctx).await; // No need to run this in parallel as serenity will enforce one-by-one execution - for command in commands.iter() { + for command in &commands { command.register(ctx).await?; } Ok(()) diff --git a/cadency_core/src/handler/command.rs b/cadency_core/src/handler/command.rs index 7a18d8d..d936b15 100644 --- a/cadency_core/src/handler/command.rs +++ b/cadency_core/src/handler/command.rs @@ -22,7 +22,7 @@ impl EventHandler for Handler { info!("⏳ Started to submit commands, please wait..."); match setup_commands(&ctx).await { - Ok(_) => info!("✅ Application commands submitted"), + Ok(()) => info!("✅ Application commands submitted"), Err(err) => error!("❌ Failed to submit application commands: {:?}", err), }; } diff --git a/cadency_yt_playlist/src/ytdlp.rs b/cadency_yt_playlist/src/ytdlp.rs index 6f00fa0..c3701ea 100644 --- a/cadency_yt_playlist/src/ytdlp.rs +++ b/cadency_yt_playlist/src/ytdlp.rs @@ -33,7 +33,7 @@ impl YtDlp { self.command .args(self.args.clone()) .spawn() - .and_then(|child| child.wait_with_output()) + .and_then(std::process::Child::wait_with_output) } }