Skip to content

Commit

Permalink
Fix unused warnings when cache feature is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrasnitski committed Mar 29, 2024
1 parent 8692c34 commit 92966e7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/builder/edit_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ impl<'a> EditMessage<'a> {
self
}

#[cfg(feature = "cache")]
fn is_only_suppress_embeds(&self) -> bool {
self.flags == Some(MessageFlags::SUPPRESS_EMBEDS)
&& self.content.is_none()
Expand Down Expand Up @@ -234,6 +235,7 @@ impl<'a> EditMessage<'a> {
/// [Manage Messages]: Permissions::MANAGE_MESSAGES
/// [`From<Embed>`]: CreateEmbed#impl-From<Embed>
#[cfg(feature = "http")]
#[cfg_attr(not(feature = "cache"), allow(unused_variables))]
pub async fn execute(
mut self,
cache_http: impl CacheHttp,
Expand Down

0 comments on commit 92966e7

Please sign in to comment.