diff options
| author | acdenisSK <[email protected]> | 2017-07-10 17:22:02 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-07-10 17:22:02 +0200 |
| commit | 64bfc5471808cff59c9b4b5eef80a756f13ff5be (patch) | |
| tree | a6150f3caa6e8192bad0fe30d84b4d8e03eabe8d /src | |
| parent | Add a way to return all online members in a guild (diff) | |
| download | serenity-64bfc5471808cff59c9b4b5eef80a756f13ff5be.tar.xz serenity-64bfc5471808cff59c9b4b5eef80a756f13ff5be.zip | |
Make `User` and `Ban` comparable and hashable
Diffstat (limited to 'src')
| -rw-r--r-- | src/model/guild/mod.rs | 2 | ||||
| -rw-r--r-- | src/model/user.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/model/guild/mod.rs b/src/model/guild/mod.rs index 03aa07e..2858a86 100644 --- a/src/model/guild/mod.rs +++ b/src/model/guild/mod.rs @@ -30,7 +30,7 @@ use ::builder::{EditGuild, EditMember, EditRole}; use ::constants::LARGE_THRESHOLD; /// A representation of a banning of a user. -#[derive(Clone, Debug, Deserialize)] +#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Hash)] pub struct Ban { /// The reason given for this ban. pub reason: Option<String>, diff --git a/src/model/user.rs b/src/model/user.rs index c53b823..9c248ba 100644 --- a/src/model/user.rs +++ b/src/model/user.rs @@ -366,7 +366,7 @@ impl Default for OnlineStatus { } /// Information about a user. -#[derive(Clone, Debug, Deserialize)] +#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Hash)] pub struct User { /// The unique Id of the user. Can be used to calculate the account's /// cration date. |