aboutsummaryrefslogtreecommitdiff
path: root/src/model/channel/mod.rs
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2017-04-24 22:51:22 -0700
committerZeyla Hellyer <[email protected]>2017-04-24 22:51:22 -0700
commit6aeea4da70da26631533b27052133f3620cebc5a (patch)
treee82e21cf13f804f33216a69e25d42098291e3c94 /src/model/channel/mod.rs
parentRemove example 01 debugging (diff)
downloadserenity-6aeea4da70da26631533b27052133f3620cebc5a.tar.xz
serenity-6aeea4da70da26631533b27052133f3620cebc5a.zip
Fix deserialization for Ids
Attempt to deserialize from both a str and a u64 instead of the default derive impl.
Diffstat (limited to 'src/model/channel/mod.rs')
-rw-r--r--src/model/channel/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/model/channel/mod.rs b/src/model/channel/mod.rs
index 6600dc7..09cf70a 100644
--- a/src/model/channel/mod.rs
+++ b/src/model/channel/mod.rs
@@ -20,6 +20,7 @@ use serde::de::Error as DeError;
use serde_json;
use std::fmt::{Display, Formatter, Result as FmtResult};
use std::io::Read;
+use super::utils::deserialize_u64;
use ::model::*;
use ::utils::builder::{CreateMessage, GetMessages};
@@ -438,6 +439,7 @@ impl ChannelType {
struct PermissionOverwriteData {
allow: Permissions,
deny: Permissions,
+ #[serde(deserialize_with="deserialize_u64")]
id: u64,
#[serde(rename="type")]
kind: String,