Skip to content

Commit

Permalink
Remove unused warning #[allow(...)]s (serenity-rs#2682)
Browse files Browse the repository at this point in the history
A couple of clippy bugs have been fixed and I have shrunk model
sizes enough to make `clippy::large_enum_variant` go away.
  • Loading branch information
GnomedDev authored and arqunis committed Jan 22, 2024
1 parent 7d641d7 commit eda566c
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/client/event_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
$(
Expand Down
1 change: 0 additions & 1 deletion src/framework/standard/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion src/framework/standard/parse/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion src/model/channel/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
1 change: 0 additions & 1 deletion src/model/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
1 change: 0 additions & 1 deletion src/model/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ pub mod comma_separated_string {
Ok(vec)
}

#[allow(clippy::ptr_arg)]
pub fn serialize<S: Serializer>(
vec: &FixedArray<FixedString>,
serializer: S,
Expand Down

0 comments on commit eda566c

Please sign in to comment.