aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-08-15 14:15:32 +0200
committeracdenisSK <[email protected]>2017-08-15 14:15:32 +0200
commitfd47b865f3c32f5bbfce65162023898a6ecd29a1 (patch)
treeb48faf217f36209443ae9c5388c1e4f24d7a15c5 /src/model
parentUpdate examples (diff)
downloadserenity-fd47b865f3c32f5bbfce65162023898a6ecd29a1.tar.xz
serenity-fd47b865f3c32f5bbfce65162023898a6ecd29a1.zip
Use `#[serde(default)]` on `nsfw` instead
Diffstat (limited to 'src/model')
-rw-r--r--src/model/channel/guild_channel.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/model/channel/guild_channel.rs b/src/model/channel/guild_channel.rs
index 99a8682..5706fa6 100644
--- a/src/model/channel/guild_channel.rs
+++ b/src/model/channel/guild_channel.rs
@@ -72,12 +72,10 @@ pub struct GuildChannel {
/// [`is_nsfw`]: struct.GuildChannel.html#method.is_nsfw
// This field can or can not be present sometimes, but if it isn't
// default to `false`.
- #[serde(default = "nsfw_false")]
+ #[serde(default)]
pub nsfw: bool,
}
-fn nsfw_false() -> bool { false }
-
#[cfg(feature = "model")]
impl GuildChannel {
/// Broadcasts to the channel that the current user is typing.