diff options
| author | Bond-009 <[email protected]> | 2017-07-21 20:08:34 +0200 |
|---|---|---|
| committer | alex <[email protected]> | 2017-07-21 20:08:34 +0200 |
| commit | fd89d09d3397eba21d1b454d3b6155ba9c3a829e (patch) | |
| tree | 5db228036f9e5b2fcc532212a2fabd2bf81122cc | |
| parent | Utilise the newly stabilised loop-with-break-value (diff) | |
| download | serenity-fd89d09d3397eba21d1b454d3b6155ba9c3a829e.tar.xz serenity-fd89d09d3397eba21d1b454d3b6155ba9c3a829e.zip | |
Fix the tests (#129)
| -rw-r--r-- | src/model/channel/guild_channel.rs | 2 | ||||
| -rw-r--r-- | tests/test_formatters.rs | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/model/channel/guild_channel.rs b/src/model/channel/guild_channel.rs index 0217231..678e601 100644 --- a/src/model/channel/guild_channel.rs +++ b/src/model/channel/guild_channel.rs @@ -386,7 +386,7 @@ impl GuildChannel { #[cfg(feature="utils")] #[inline] pub fn is_nsfw(&self) -> bool { - self.nsfw || self.name == "nsfw" || self.kind == ChannelType::Text && serenity_utils::is_nsfw(&self.name) + self.kind == ChannelType::Text && (self.nsfw || serenity_utils::is_nsfw(&self.name)) } /// Gets a message from the channel. diff --git a/tests/test_formatters.rs b/tests/test_formatters.rs index ba21033..a651e60 100644 --- a/tests/test_formatters.rs +++ b/tests/test_formatters.rs @@ -29,6 +29,7 @@ fn test_mention() { position: 1, topic: None, user_limit: None, + nsfw: false, }))); let emoji = Emoji { id: EmojiId(5), |