aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2018-08-15 20:48:24 -0700
committerZeyla Hellyer <[email protected]>2018-08-15 20:48:24 -0700
commite59f766c24b53b9c98109e8cfeafdec36feed161 (patch)
tree03c5731fe3ae09fde84233e44ba58355b15be63e /src
parentFix routing for http::create_private_channel (diff)
downloadserenity-e59f766c24b53b9c98109e8cfeafdec36feed161.tar.xz
serenity-e59f766c24b53b9c98109e8cfeafdec36feed161.zip
Fix GuildChannel::_permissions_for on no-cache
Fix the compilation of `GuildChannel::_permissions_for` when the `cache` feature is disabled.
Diffstat (limited to 'src')
-rw-r--r--src/model/channel/guild_channel.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/model/channel/guild_channel.rs b/src/model/channel/guild_channel.rs
index b1fec05..3713004 100644
--- a/src/model/channel/guild_channel.rs
+++ b/src/model/channel/guild_channel.rs
@@ -230,7 +230,7 @@ impl GuildChannel {
/// [`PermissionOverwrite::Member`]: struct.PermissionOverwrite.html#variant.Member
/// [`PermissionOverwrite::Role`]: struct.PermissionOverwrite.html#variant.Role
/// [`Role`]: ../guild/struct.Role.html
- /// [Attach Files]:
+ /// [Attach Files]:
/// ../permissions/struct.Permissions.html#associatedconstant.ATTACH_FILES
/// [Manage Channels]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_CHANNELS
/// [Manage Webhooks]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_WEBHOOKS
@@ -526,6 +526,7 @@ impl GuildChannel {
self._permissions_for(user_id.into())
}
+ #[cfg(feature = "cache")]
fn _permissions_for(&self, user_id: UserId) -> Result<Permissions> {
self.guild()
.ok_or_else(|| Error::Model(ModelError::GuildNotFound))