Format and cleanup code

This commit is contained in:
2024-12-18 20:13:12 -05:00
parent aa7bad945a
commit 83ef124c41
15 changed files with 106 additions and 109 deletions

View File

@@ -52,12 +52,12 @@ pub async fn leave_voice_channel(manager: &Arc<Songbird>, guild_id: &GuildId) ->
}
/**
* Checks if a URL is valid and if it is a playlist.
* 1st tuple value is if the URL is valid.
* 2nd tuple value is if the URL is a playlist.
* Validates whether the given string is a properly formatted URL.
*
* Returns `true` if the input string is a valid URL, otherwise `false`.
*/
fn is_valid_url(url: &str) -> bool {
Url::parse(url).ok().map_or(false, |valid_url| true)
Url::parse(url).is_ok()
}
/**