Skip to content

Commit

Permalink
refactor: Fix some pendantic clippy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jontze committed Dec 8, 2023
1 parent 55ef4f3 commit 416d53a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions cadency_core/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pub struct Cadency {
}

impl Cadency {
#[must_use]
pub fn builder() -> CadencyBuilder {
CadencyBuilder::default()
}
Expand Down
2 changes: 1 addition & 1 deletion cadency_core/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
Expand Down
2 changes: 1 addition & 1 deletion cadency_core/src/handler/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
};
}
Expand Down
2 changes: 1 addition & 1 deletion cadency_yt_playlist/src/ytdlp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 416d53a

Please sign in to comment.