aboutsummaryrefslogtreecommitdiff
path: root/src/model/channel/mod.rs
diff options
context:
space:
mode:
authorLakelezz <[email protected]>2018-10-20 23:42:29 +0200
committerGitHub <[email protected]>2018-10-20 23:42:29 +0200
commit75fb5c041511077e60e577e55039acc33d624569 (patch)
tree46635aab225f9ee51ff78921eaa1cbda84bee61e /src/model/channel/mod.rs
parentPrefix only Command (#416) (diff)
downloadserenity-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.rs10
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;