From ccea14b4bc7c6325d3555bbf292543d576fbdca9 Mon Sep 17 00:00:00 2001 From: nickelc Date: Tue, 19 Apr 2022 20:12:44 +0200 Subject: [PATCH] Remove deprecated `audit_log` re-exports and types (#1864) 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. --- src/model/guild/audit_log.rs | 36 ------------------------------------ src/model/guild/mod.rs | 3 --- 2 files changed, 39 deletions(-) diff --git a/src/model/guild/audit_log.rs b/src/model/guild/audit_log.rs index acde2c2c6a5..e401f2aa071 100644 --- a/src/model/guild/audit_log.rs +++ b/src/model/guild/audit_log.rs @@ -101,9 +101,6 @@ impl Serialize for Action { } } -#[deprecated(note = "use `ChannelAction`")] -pub type ActionChannel = ChannelAction; - /// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events). #[derive(Copy, Clone, Debug)] #[non_exhaustive] @@ -114,9 +111,6 @@ pub enum ChannelAction { Delete = 12, } -#[deprecated(note = "use `ChannelOverwriteAction`")] -pub type ActionChannelOverwrite = ChannelOverwriteAction; - /// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events). #[derive(Copy, Clone, Debug)] #[non_exhaustive] @@ -127,9 +121,6 @@ pub enum ChannelOverwriteAction { Delete = 15, } -#[deprecated(note = "use `MemberAction`")] -pub type ActionMember = MemberAction; - /// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events). #[derive(Copy, Clone, Debug)] #[non_exhaustive] @@ -146,9 +137,6 @@ pub enum MemberAction { BotAdd = 28, } -#[deprecated(note = "use `RoleAction`")] -pub type ActionRole = RoleAction; - /// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events). #[derive(Copy, Clone, Debug)] #[non_exhaustive] @@ -159,9 +147,6 @@ pub enum RoleAction { Delete = 32, } -#[deprecated(note = "use `InviteAction`")] -pub type ActionInvite = InviteAction; - /// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events). #[derive(Copy, Clone, Debug)] #[non_exhaustive] @@ -172,9 +157,6 @@ pub enum InviteAction { Delete = 42, } -#[deprecated(note = "use `WebhookAction`")] -pub type ActionWebhook = WebhookAction; - /// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events). #[derive(Copy, Clone, Debug)] #[non_exhaustive] @@ -185,9 +167,6 @@ pub enum WebhookAction { Delete = 52, } -#[deprecated(note = "use `EmojiAction`")] -pub type ActionEmoji = EmojiAction; - /// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events). #[derive(Copy, Clone, Debug)] #[non_exhaustive] @@ -198,9 +177,6 @@ pub enum EmojiAction { Delete = 62, } -#[deprecated(note = "use `MessageAction`")] -pub type ActionMessage = MessageAction; - /// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events). #[derive(Copy, Clone, Debug)] #[non_exhaustive] @@ -212,9 +188,6 @@ pub enum MessageAction { Unpin = 75, } -#[deprecated(note = "use `IntegrationAction`")] -pub type ActionIntegration = IntegrationAction; - /// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events). #[derive(Copy, Clone, Debug)] #[non_exhaustive] @@ -225,9 +198,6 @@ pub enum IntegrationAction { Delete = 82, } -#[deprecated(note = "use `StageInstanceAction`")] -pub type ActionStageInstance = StageInstanceAction; - /// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events). #[derive(Copy, Clone, Debug)] #[non_exhaustive] @@ -238,9 +208,6 @@ pub enum StageInstanceAction { Delete = 85, } -#[deprecated(note = "use `StickerAction`")] -pub type ActionSticker = StickerAction; - /// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events). #[derive(Copy, Clone, Debug)] #[non_exhaustive] @@ -261,9 +228,6 @@ pub enum ScheduledEventAction { Delete = 102, } -#[deprecated(note = "use `ThreadAction`")] -pub type ActionThread = ThreadAction; - /// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events). #[derive(Copy, Clone, Debug)] #[non_exhaustive] diff --git a/src/model/guild/mod.rs b/src/model/guild/mod.rs index af59af95ce8..a93f5edaa5b 100644 --- a/src/model/guild/mod.rs +++ b/src/model/guild/mod.rs @@ -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::*;