Skip to content

Commit

Permalink
Remove deprecated audit_log re-exports and types (serenity-rs#1864)
Browse files Browse the repository at this point in the history
The audit log types are no longer re-exported in the `model::guild` module.

BREAKING CHANGES:
- The `audit_log::Action*` enum sub types are renamed to `*Action`.
  For instance, `ActionChannel` to `ChannelAction`.

- The audit log types must be imported directly from the
  `model::guild::audit_log` module.
  • Loading branch information
nickelc authored and arqunis committed Sep 2, 2022
1 parent 15a9568 commit 62f1c35
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
36 changes: 0 additions & 36 deletions src/model/guild/audit_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@ impl Serialize for Action {
}
}

#[deprecated(note = "use `ChannelAction`")]
pub type ActionChannel = ChannelAction;

#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
#[repr(u8)]
Expand All @@ -111,9 +108,6 @@ pub enum ChannelAction {
Delete = 12,
}

#[deprecated(note = "use `ChannelOverwriteAction`")]
pub type ActionChannelOverwrite = ChannelOverwriteAction;

#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
#[repr(u8)]
Expand All @@ -123,9 +117,6 @@ pub enum ChannelOverwriteAction {
Delete = 15,
}

#[deprecated(note = "use `MemberAction`")]
pub type ActionMember = MemberAction;

#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
#[repr(u8)]
Expand All @@ -141,9 +132,6 @@ pub enum MemberAction {
BotAdd = 28,
}

#[deprecated(note = "use `RoleAction`")]
pub type ActionRole = RoleAction;

#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
#[repr(u8)]
Expand All @@ -153,9 +141,6 @@ pub enum RoleAction {
Delete = 32,
}

#[deprecated(note = "use `InviteAction`")]
pub type ActionInvite = InviteAction;

#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
#[repr(u8)]
Expand All @@ -165,9 +150,6 @@ pub enum InviteAction {
Delete = 42,
}

#[deprecated(note = "use `WebhookAction`")]
pub type ActionWebhook = WebhookAction;

#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
#[repr(u8)]
Expand All @@ -177,9 +159,6 @@ pub enum WebhookAction {
Delete = 52,
}

#[deprecated(note = "use `EmojiAction`")]
pub type ActionEmoji = EmojiAction;

#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
#[repr(u8)]
Expand All @@ -189,9 +168,6 @@ pub enum EmojiAction {
Delete = 62,
}

#[deprecated(note = "use `MessageAction`")]
pub type ActionMessage = MessageAction;

#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
#[repr(u8)]
Expand All @@ -202,9 +178,6 @@ pub enum MessageAction {
Unpin = 75,
}

#[deprecated(note = "use `IntegrationAction`")]
pub type ActionIntegration = IntegrationAction;

#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
#[repr(u8)]
Expand All @@ -214,9 +187,6 @@ pub enum IntegrationAction {
Delete = 82,
}

#[deprecated(note = "use `StageInstanceAction`")]
pub type ActionStageInstance = StageInstanceAction;

#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
#[repr(u8)]
Expand All @@ -226,9 +196,6 @@ pub enum StageInstanceAction {
Delete = 85,
}

#[deprecated(note = "use `StickerAction`")]
pub type ActionSticker = StickerAction;

#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
#[repr(u8)]
Expand All @@ -247,9 +214,6 @@ pub enum ScheduledEventAction {
Delete = 102,
}

#[deprecated(note = "use `ThreadAction`")]
pub type ActionThread = ThreadAction;

#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
#[repr(u8)]
Expand Down
3 changes: 0 additions & 3 deletions src/model/guild/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ use tracing::error;
#[cfg(all(feature = "model", feature = "cache"))]
use tracing::warn;

#[doc(hidden)]
#[deprecated(note = "import the types from the `audit_log` module")]
pub use self::audit_log::*;
pub use self::emoji::*;
pub use self::guild_id::*;
pub use self::guild_preview::*;
Expand Down

0 comments on commit 62f1c35

Please sign in to comment.