Run cargo fmt --all

This commit is contained in:
2025-08-25 20:03:21 -03:00
parent e5fe77c287
commit 676fdcfd96
6 changed files with 35 additions and 19 deletions
+8 -4
View File
@@ -5,9 +5,13 @@ use deadpool_redis::{cluster::PoolError, redis::RedisError};
use thiserror::Error;
use twilight_http::response::DeserializeBodyError;
use crate::{database::models::{DatabaseError, DatabaseOrDiscordError}, framework::{commands::{
arguments::Argument, context::CommandContext, permissions::Permission,
}, runtime::Runtime}};
use crate::{
database::models::{DatabaseError, DatabaseOrDiscordError},
framework::{
commands::{arguments::Argument, context::CommandContext, permissions::Permission},
runtime::Runtime,
},
};
pub mod arguments;
pub mod context;
@@ -40,7 +44,7 @@ pub enum CommandError {
RedisFailed(#[from] RedisError),
#[error(transparent)]
DatabaseOrDiscordError(#[from] DatabaseOrDiscordError)
DatabaseOrDiscordError(#[from] DatabaseOrDiscordError),
}
#[async_trait]
+1 -3
View File
@@ -81,9 +81,7 @@ where
))
.await
.inspect(|_| log::debug!("Executed component interaction"))
.inspect_err(|e| {
log::error!("Interaction execution failed: {e:?}")
})
.inspect_err(|e| log::error!("Interaction execution failed: {e:?}"))
} else {
Err(InteractionError::InteractionNotFound)
}
+14 -6
View File
@@ -3,14 +3,22 @@ use async_trait::async_trait;
use crate::{
extras::Extras,
framework::commands::{
arguments::{Arg, Argument, NeedyString, ParseArguments}, context::CommandContext, Command, CommandError
Command, CommandError,
arguments::{Arg, Argument, NeedyString, ParseArguments},
context::CommandContext,
},
groups::{about::{
components::{
HelpDonateLinkButton, HelpGoBackButton, HelpSupportLinkButton, HelpWebsiteLinkButton,
groups::{
about::{
components::{
HelpDonateLinkButton, HelpGoBackButton, HelpSupportLinkButton,
HelpWebsiteLinkButton,
},
embeds::{
get_all_command_help_embed, get_command_help_embed, get_command_not_found_embed,
},
},
embeds::{get_all_command_help_embed, get_command_help_embed, get_command_not_found_embed},
}, calls::components::CodeOfConductButton},
calls::components::CodeOfConductButton,
},
state::State,
};
+3 -1
View File
@@ -11,7 +11,9 @@ use crate::{
database::models::Channel,
extras::Extras,
framework::{
commands::extras::ExtrasGetter, events::traits::{EventResult, OnMessageHandler}, runtime::Runtime
commands::extras::ExtrasGetter,
events::traits::{EventResult, OnMessageHandler},
runtime::Runtime,
},
groups::leveling::constants::KEY_LEADERBOARD_MONTHLY,
state::State,
+5 -1
View File
@@ -111,7 +111,11 @@ pub fn u64_to_i64(u: u64) -> i64 {
/// Returns:
/// [`Option<(&str, &str)>`] - The splitted parts of the string, or [`None`] if no occurrences of
/// `pattern` were found in `s`.
pub fn split_at_nth_from_end<'a, 'b>(s: &'a str, pattern: &'b str, n: usize) -> Option<(&'a str, &'a str)> {
pub fn split_at_nth_from_end<'a, 'b>(
s: &'a str,
pattern: &'b str,
n: usize,
) -> Option<(&'a str, &'a str)> {
let mut end = s.len();
let mut count = 0;