From eda566c53822ecc377702e9bd3e2fe0ff5a78620 Mon Sep 17 00:00:00 2001 From: Gnome! Date: Tue, 2 Jan 2024 20:08:21 +0000 Subject: [PATCH] Remove unused warning `#[allow(...)]`s (#2682) A couple of clippy bugs have been fixed and I have shrunk model sizes enough to make `clippy::large_enum_variant` go away. --- src/client/event_handler.rs | 1 - src/framework/standard/args.rs | 1 - src/framework/standard/parse/mod.rs | 1 - src/model/channel/mod.rs | 1 - src/model/event.rs | 1 - src/model/utils.rs | 1 - 6 files changed, 6 deletions(-) diff --git a/src/client/event_handler.rs b/src/client/event_handler.rs index 9c12346f715..2674d9ca254 100644 --- a/src/client/event_handler.rs +++ b/src/client/event_handler.rs @@ -33,7 +33,6 @@ macro_rules! event_handler { /// This enum stores every possible event that an [`EventHandler`] can receive. #[non_exhaustive] - #[allow(clippy::large_enum_variant)] // TODO: do some boxing to fix this #[derive(Clone, Debug)] pub enum FullEvent { $( diff --git a/src/framework/standard/args.rs b/src/framework/standard/args.rs index 84face55ef0..300c31d3584 100644 --- a/src/framework/standard/args.rs +++ b/src/framework/standard/args.rs @@ -81,7 +81,6 @@ impl<'a> From<&'a str> for Delimiter { } #[derive(Clone, Copy, Debug, PartialEq)] -#[allow(clippy::enum_variant_names)] enum TokenKind { Argument, QuotedArgument, diff --git a/src/framework/standard/parse/mod.rs b/src/framework/standard/parse/mod.rs index 165f8f6dbf1..66ce4289fdf 100644 --- a/src/framework/standard/parse/mod.rs +++ b/src/framework/standard/parse/mod.rs @@ -172,7 +172,6 @@ async fn find_prefix<'a>( /// - Nothing /// /// In all cases, whitespace after the prefix is cleared. -#[allow(clippy::needless_lifetimes)] // Clippy and the compiler disagree pub async fn prefix<'a>( ctx: &Context, msg: &Message, diff --git a/src/model/channel/mod.rs b/src/model/channel/mod.rs index ddc1bb083f7..43488e36850 100644 --- a/src/model/channel/mod.rs +++ b/src/model/channel/mod.rs @@ -34,7 +34,6 @@ use crate::model::Timestamp; #[derive(Clone, Debug, Serialize)] #[serde(untagged)] #[non_exhaustive] -#[allow(clippy::large_enum_variant)] // https://github.com/rust-lang/rust-clippy/issues/9798 pub enum Channel { /// A channel within a [`Guild`]. Guild(GuildChannel), diff --git a/src/model/event.rs b/src/model/event.rs index 14bba727239..cf75757afe0 100644 --- a/src/model/event.rs +++ b/src/model/event.rs @@ -1117,7 +1117,6 @@ impl<'de> Deserialize<'de> for GatewayEvent { /// Event received over a websocket connection /// /// [Discord docs](https://discord.com/developers/docs/topics/gateway-events#receive-events). -#[allow(clippy::large_enum_variant)] #[cfg_attr(feature = "typesize", derive(typesize::derive::TypeSize))] #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] diff --git a/src/model/utils.rs b/src/model/utils.rs index f473a545c01..43b3c26b189 100644 --- a/src/model/utils.rs +++ b/src/model/utils.rs @@ -296,7 +296,6 @@ pub mod comma_separated_string { Ok(vec) } - #[allow(clippy::ptr_arg)] pub fn serialize( vec: &FixedArray, serializer: S,