Azoy / Sword

Discord library for Swift
https://azoy.github.io/Sword
MIT License
179 stars 52 forks source link

Make Snowflake a struct instead of a typealias #24

Closed TellowKrinkle closed 7 years ago

TellowKrinkle commented 7 years ago

Because Swift typealiases are just aliases, the Snowflake String comparison functions were also becoming available to compare any UInt64 to a String, making the code (11 == "11") suddenly valid in all code using Sword as a library. This makes sure that you can only compare Snowflakes to Strings and not just any UInt64.