Skip to content

Commit

Permalink
Fix rustfmt errors
Browse files Browse the repository at this point in the history
  • Loading branch information
zkxs committed Aug 12, 2024
1 parent 1808398 commit bb3758b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/builtins/register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ use crate::serenity_prelude as serenity;
/// serenity::Command::set_global_commands(ctx, create_commands).await?;
/// # Ok(()) }
/// ```
pub fn create_application_commands<'a, U:'a , E: 'a>(
commands: impl IntoIterator<Item=&'a crate::Command<U, E>>,
pub fn create_application_commands<'a, U: 'a, E: 'a>(
commands: impl IntoIterator<Item = &'a crate::Command<U, E>>,
) -> Vec<serenity::CreateCommand> {
/// We decided to extract context menu commands recursively, despite the subcommand hierarchy
/// not being preserved. Because it's more confusing to just silently discard context menu
Expand Down Expand Up @@ -51,7 +51,7 @@ pub fn create_application_commands<'a, U:'a , E: 'a>(
/// [`serenity::Command::set_global_commands`].
pub async fn register_globally<'a, U: 'a, E: 'a>(
http: impl AsRef<serenity::Http>,
commands: impl IntoIterator<Item=&'a crate::Command<U, E>>,
commands: impl IntoIterator<Item = &'a crate::Command<U, E>>,
) -> Result<(), serenity::Error> {
let builder = create_application_commands(commands);
serenity::Command::set_global_commands(http, builder).await?;
Expand All @@ -64,7 +64,7 @@ pub async fn register_globally<'a, U: 'a, E: 'a>(
/// [`serenity::GuildId::set_commands`].
pub async fn register_in_guild<'a, U: 'a, E: 'a>(
http: impl AsRef<serenity::Http>,
commands: impl IntoIterator<Item=&'a crate::Command<U, E>>,
commands: impl IntoIterator<Item = &'a crate::Command<U, E>>,
guild_id: serenity::GuildId,
) -> Result<(), serenity::Error> {
let builder = create_application_commands(commands);
Expand Down

0 comments on commit bb3758b

Please sign in to comment.