Skip to content

Commit

Permalink
Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
1Git2Clone committed Dec 15, 2024
1 parent a51fb34 commit 9c06170
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/enums/emojis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,29 @@
/// }
/// }
///
/// assert_eq!(Emojis::EmojiOne.to_string(), "<:EmojiOne:123456789>".to_string());
/// assert_eq!(Emojis::EmojiTwo.to_string(), "<:EmojiTwo:987654321>".to_string());
/// assert_eq!(
/// Emojis::EmojiOne.to_string(),
/// "<:EmojiOne:123456789>".to_string()
/// );
/// assert_eq!(
/// Emojis::EmojiTwo.to_string(),
/// "<:EmojiTwo:987654321>".to_string()
/// );
/// ```
#[macro_export]
macro_rules! display_emoji_impl {
($enum_name:ident { $($variant:ident => $id:expr),* $(,)? }) => {
impl std::fmt::Display for $enum_name {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
$(
Self::$variant => {
write!(
f,
concat!(
"<:",
stringify!($variant),
":",
$id,
">"
)
$(Self::$variant => {
write!(
f,
concat!(
"<:", stringify!($variant), ":", $id, ">"
)
}
)*
)
})*
}
}
}
Expand Down

0 comments on commit 9c06170

Please sign in to comment.