Format and cleanup code
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user