Skip to content

Commit

Permalink
Add missing impl From<Snowflake> for u64, closes `From<Snowflake> f…
Browse files Browse the repository at this point in the history
…or u64` missing #550
  • Loading branch information
bitfl0wer committed Aug 26, 2024
1 parent 9926f8a commit 05b9f1c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/types/utils/snowflake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ impl From<u64> for Snowflake {
}
}

impl From<Snowflake> for u64 {
fn from(item: Snowflake) -> Self {
item.0
}
}

impl serde::Serialize for Snowflake {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
Expand Down

0 comments on commit 05b9f1c

Please sign in to comment.