From 8ed1377ade01174e80a20aa5c029af34aa8cd028 Mon Sep 17 00:00:00 2001 From: Simon Stjernholm Date: Wed, 28 Feb 2024 14:47:29 +0100 Subject: [PATCH] update rspotify crate to v0.12.0 (#249) * updated rpsotify v0.11.6 -> v0.11.7 * updated rpspotify to 0.12.0 * fix clippy lints * fix cargo fmt check --- src/commands/play.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/commands/play.rs b/src/commands/play.rs index 0a5f8608..9070fb31 100644 --- a/src/commands/play.rs +++ b/src/commands/play.rs @@ -170,7 +170,9 @@ pub async fn play( .ok_or(ParrotError::Other("failed to fetch playlist"))?; for url in urls.iter() { - let Ok(queue) = enqueue_track(&call, &QueryType::VideoLink(url.to_string())).await else { + let Ok(queue) = + enqueue_track(&call, &QueryType::VideoLink(url.to_string())).await + else { continue; }; update_queue_messages(&ctx.http, &ctx.data, &queue, guild_id).await; @@ -195,7 +197,8 @@ pub async fn play( .ok_or(ParrotError::Other("failed to fetch playlist"))?; for (idx, url) in urls.into_iter().enumerate() { - let Ok(queue) = insert_track(&call, &QueryType::VideoLink(url), idx + 1).await else { + let Ok(queue) = insert_track(&call, &QueryType::VideoLink(url), idx + 1).await + else { continue; }; update_queue_messages(&ctx.http, &ctx.data, &queue, guild_id).await; @@ -228,7 +231,9 @@ pub async fn play( let mut insert_idx = 1; for (i, url) in urls.into_iter().enumerate() { - let Ok(mut queue) = insert_track(&call, &QueryType::VideoLink(url), insert_idx).await else { + let Ok(mut queue) = + insert_track(&call, &QueryType::VideoLink(url), insert_idx).await + else { continue; };