Skip to content

Commit

Permalink
Remove obsolete #[cfg(feature = "utils")] attributes on model metho…
Browse files Browse the repository at this point in the history
…ds (#1618)

The attributes are no longer needed after `hashmap_to_json_map` was
moved into the `json` module.
  • Loading branch information
nickelc authored and arqunis committed Mar 15, 2022
1 parent 342fdbb commit 0675fd1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
5 changes: 0 additions & 5 deletions src/model/channel/channel_id.rs
Expand Up @@ -85,7 +85,6 @@ impl ChannelId {
/// Returns [`Error::Http`] if the current user lacks permission.
///
/// [Create Invite]: Permissions::CREATE_INVITE
#[cfg(feature = "utils")]
pub async fn create_invite<F>(&self, http: impl AsRef<Http>, f: F) -> Result<RichInvite>
where
F: FnOnce(&mut CreateInvite) -> &mut CreateInvite,
Expand Down Expand Up @@ -332,7 +331,6 @@ impl ChannelId {
/// or if an invalid value is set.
///
/// [Manage Channel]: Permissions::MANAGE_CHANNELS
#[cfg(feature = "utils")]
#[inline]
pub async fn edit<F>(self, http: impl AsRef<Http>, f: F) -> Result<GuildChannel>
where
Expand Down Expand Up @@ -363,7 +361,6 @@ impl ChannelId {
///
/// [`EditMessage`]: crate::builder::EditMessage
/// [`the limit`]: crate::builder::EditMessage::content
#[cfg(feature = "utils")]
#[inline]
pub async fn edit_message<F>(
self,
Expand Down Expand Up @@ -715,7 +712,6 @@ impl ChannelId {
/// [Attach Files]: Permissions::ATTACH_FILES
/// [Send Messages]: Permissions::SEND_MESSAGES
/// [`File`]: tokio::fs::File
#[cfg(feature = "utils")]
pub async fn send_files<'a, F, T, It>(
self,
http: impl AsRef<Http>,
Expand Down Expand Up @@ -757,7 +753,6 @@ impl ChannelId {
///
/// [`CreateMessage`]: crate::builder::CreateMessage
/// [Send Messages]: Permissions::SEND_MESSAGES
#[cfg(feature = "utils")]
pub async fn send_message<'a, F>(self, http: impl AsRef<Http>, f: F) -> Result<Message>
where
for<'b> F: FnOnce(&'b mut CreateMessage<'a>) -> &'b mut CreateMessage<'a>,
Expand Down
1 change: 0 additions & 1 deletion src/model/channel/guild_channel.rs
Expand Up @@ -415,7 +415,6 @@ impl GuildChannel {
/// if the current user lacks permission to edit the channel.
///
/// Otherwise returns [`Error::Http`] if the current user lacks permission.
#[cfg(feature = "utils")]
pub async fn edit<F>(&mut self, cache_http: impl CacheHttp, f: F) -> Result<()>
where
F: FnOnce(&mut EditChannel) -> &mut EditChannel,
Expand Down
3 changes: 1 addition & 2 deletions src/model/channel/message.rs
Expand Up @@ -207,7 +207,7 @@ impl Message {

/// A util function for determining whether this message was sent by someone else, or the
/// bot.
#[cfg(all(feature = "cache", feature = "utils"))]
#[cfg(feature = "cache")]
pub fn is_own(&self, cache: impl AsRef<Cache>) -> bool {
self.author.id == cache.as_ref().current_user().id
}
Expand Down Expand Up @@ -769,7 +769,6 @@ impl Message {
/// Otherwise returns [`Error::Http`] if the current user lacks permission.
///
/// [Manage Messages]: Permissions::MANAGE_MESSAGES
#[cfg(feature = "utils")]
pub async fn suppress_embeds(&mut self, cache_http: impl CacheHttp) -> Result<()> {
#[cfg(feature = "cache")]
{
Expand Down

0 comments on commit 0675fd1

Please sign in to comment.