From 4a633e09cf80388f929840cb6a00472606953d68 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 acb25448a3a..04563a6a10d 100644 --- a/src/client/event_handler.rs +++ b/src/client/event_handler.rs @@ -29,7 +29,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 727bf9e5b1d..63e299da1c1 100644 --- a/src/framework/standard/parse/mod.rs +++ b/src/framework/standard/parse/mod.rs @@ -168,7 +168,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 70083b14208..13a1f8b09ca 100644 --- a/src/model/channel/mod.rs +++ b/src/model/channel/mod.rs @@ -33,7 +33,6 @@ use crate::model::utils::is_false; #[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 4fd11eab32e..eb1a5ff63dd 100644 --- a/src/model/event.rs +++ b/src/model/event.rs @@ -1112,7 +1112,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 ea08a9ecc19..0985c603522 100644 --- a/src/model/utils.rs +++ b/src/model/utils.rs @@ -334,7 +334,6 @@ pub mod comma_separated_string { Ok(vec) } - #[allow(clippy::ptr_arg)] pub fn serialize( vec: &FixedArray, serializer: S,