Apply cargo fmt --all

This commit is contained in:
2025-08-14 23:19:51 -03:00
parent f4f842e3c8
commit 25b96cdc2a
4 changed files with 10 additions and 7 deletions
+6 -3
View File
@@ -9,7 +9,10 @@ use twilight_util::builder::embed::{
}; };
use crate::{ use crate::{
constants::{COLOR_RED, COLOR_YELLOW}, discord::images, groups::calls::moderation::Rule, utils::ellipse, constants::{COLOR_RED, COLOR_YELLOW},
discord::images,
groups::calls::moderation::Rule,
utils::ellipse,
}; };
pub fn first_warning_embed( pub fn first_warning_embed(
@@ -144,7 +147,7 @@ pub fn first_ban_embed(
pub fn final_ban_embed( pub fn final_ban_embed(
app: &Application, app: &Application,
message: &Message, message: &Message,
rules_broken: Vec<Arc<dyn Rule>> rules_broken: Vec<Arc<dyn Rule>>,
) -> Embed { ) -> Embed {
EmbedBuilder::new() EmbedBuilder::new()
.author( .author(
@@ -182,4 +185,4 @@ pub fn final_ban_embed(
) )
.footer(EmbedFooterBuilder::new("You broke the rules 3 times.")) .footer(EmbedFooterBuilder::new("You broke the rules 3 times."))
.build() .build()
} }
+1 -1
View File
@@ -5,9 +5,9 @@ use twilight_validate::request::webhook_username;
use crate::discord::images; use crate::discord::images;
pub mod commands;
pub(super) mod components; pub(super) mod components;
pub(super) mod embeds; pub(super) mod embeds;
pub mod commands;
pub mod events; pub mod events;
pub(super) mod moderation; pub(super) mod moderation;
+1 -1
View File
@@ -148,7 +148,7 @@ pub struct NormalizedMessage {
} }
/// Generates a normalized message out of the original message string. /// Generates a normalized message out of the original message string.
/// ///
/// TODO: Replace * in the message with wildcards to match censored words. /// TODO: Replace * in the message with wildcards to match censored words.
/// ///
/// Arguments: /// Arguments:
+2 -2
View File
@@ -56,11 +56,11 @@ pub trait Bye: Sized {
impl<T> Bye for T {} impl<T> Bye for T {}
/// Trims a string to a maximum length, adding an ellipsis if it exceeds the limit. /// Trims a string to a maximum length, adding an ellipsis if it exceeds the limit.
/// ///
/// Arguments: /// Arguments:
/// * `string` - The string to trim with ellipse. /// * `string` - The string to trim with ellipse.
/// * `max_length` - The max length the string may have. /// * `max_length` - The max length the string may have.
/// ///
/// Returns: /// Returns:
/// [`String`] - The trimmed string with an ellipsis if it exceeded the limit. /// [`String`] - The trimmed string with an ellipsis if it exceeded the limit.
pub fn ellipse(string: String, max_length: usize) -> String { pub fn ellipse(string: String, max_length: usize) -> String {