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 committed May 12, 2022
1 parent c9286b1 commit 0e6a0f3
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 @@ -93,9 +93,6 @@ impl Serialize for Action {
}
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
#[repr(u8)]
Expand All @@ -232,9 +199,6 @@ pub enum StickerAction {
Delete = 92,
}

#[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 @@ -21,9 +21,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 0e6a0f3

Please sign in to comment.