diff options
| author | Lakelezz <[email protected]> | 2018-10-20 23:42:29 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-10-20 23:42:29 +0200 |
| commit | 75fb5c041511077e60e577e55039acc33d624569 (patch) | |
| tree | 46635aab225f9ee51ff78921eaa1cbda84bee61e /src/model/channel/mod.rs | |
| parent | Prefix only Command (#416) (diff) | |
| download | serenity-75fb5c041511077e60e577e55039acc33d624569.tar.xz serenity-75fb5c041511077e60e577e55039acc33d624569.zip | |
Fix NSFW Checks (#418)
Diffstat (limited to 'src/model/channel/mod.rs')
| -rw-r--r-- | src/model/channel/mod.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/model/channel/mod.rs b/src/model/channel/mod.rs index 73e2ff3..bc4ea75 100644 --- a/src/model/channel/mod.rs +++ b/src/model/channel/mod.rs @@ -334,11 +334,7 @@ impl Channel { } /// Determines if the channel is NSFW. - /// - /// Refer to [`utils::is_nsfw`] for more details. - /// - /// [`utils::is_nsfw`]: ../../utils/fn.is_nsfw.html - #[cfg(all(feature = "model", feature = "utils"))] + #[cfg(feature = "model")] #[inline] pub fn is_nsfw(&self) -> bool { match *self { @@ -769,7 +765,7 @@ mod test { #[test] fn nsfw_checks() { let mut channel = guild_channel(); - assert!(channel.is_nsfw()); + assert!(!channel.is_nsfw()); channel.kind = ChannelType::Voice; assert!(!channel.is_nsfw()); @@ -778,7 +774,7 @@ mod test { assert!(!channel.is_nsfw()); channel.name = "nsfw".to_string(); - assert!(channel.is_nsfw()); + assert!(!channel.is_nsfw()); channel.kind = ChannelType::Voice; assert!(!channel.is_nsfw()); channel.kind = ChannelType::Text; |