diff options
| author | Zeyla Hellyer <[email protected]> | 2018-08-15 20:48:24 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2018-08-15 20:48:24 -0700 |
| commit | e59f766c24b53b9c98109e8cfeafdec36feed161 (patch) | |
| tree | 03c5731fe3ae09fde84233e44ba58355b15be63e /src | |
| parent | Fix routing for http::create_private_channel (diff) | |
| download | serenity-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.rs | 3 |
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)) |