Skip to content

Commit 8fd232c

Browse files
committed
feat: allow to_string_trait_impl
1 parent 646714b commit 8fd232c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/discord/src/snowflake.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
use std::fmt::{Display, Formatter, Result};
2-
31
#[derive(Clone, Hash, PartialEq, Eq, Copy, Debug)]
42
pub struct Snowflake {
53
pub content: u64,
64
}
75

8-
impl Display for Snowflake {
9-
fn fmt(&self, f: &mut Formatter<'_>) -> Result {
10-
write!(f, "{}", self.content)
6+
#[allow(clippy::to_string_trait_impl)]
7+
impl ToString for Snowflake {
8+
fn to_string(&self) -> String {
9+
self.content.to_string()
1110
}
1211
}

0 commit comments

Comments
 (0)