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 -1
View File
@@ -7,7 +7,7 @@ use crate::framework::commands::{CommandError, context::CommandContext};
#[async_trait]
pub trait Permission<S: Send + Sync + 'static, E>: Debug {
async fn check(&self, ctx: &CommandContext<S, E>) -> Result<bool, CommandError>;
async fn on_handle_denied(&self, _ctx: &CommandContext<S, E>) -> Result<(), CommandError> {
Ok(())
}
+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)
}