From 1cd39d7b1d1ee2c392fb0ea7805809cd4bb76dd1 Mon Sep 17 00:00:00 2001 From: Luni-4 Date: Mon, 22 Aug 2022 13:03:51 +0200 Subject: [PATCH] Fix clippy warnings (#913) --- enums/templates/rust.rs | 2 +- src/languages/language_ccomment.rs | 2 +- src/languages/language_cpp.rs | 2 +- src/languages/language_java.rs | 2 +- src/languages/language_javascript.rs | 2 +- src/languages/language_mozjs.rs | 2 +- src/languages/language_preproc.rs | 2 +- src/languages/language_python.rs | 2 +- src/languages/language_rust.rs | 2 +- src/languages/language_tsx.rs | 2 +- src/languages/language_typescript.rs | 2 +- src/macros.rs | 2 +- src/spaces.rs | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/enums/templates/rust.rs b/enums/templates/rust.rs index 54bff361a..4c7b892ba 100644 --- a/enums/templates/rust.rs +++ b/enums/templates/rust.rs @@ -2,7 +2,7 @@ use num_derive::FromPrimitive; -#[derive(Clone, Debug, PartialEq, FromPrimitive)] +#[derive(Clone, Debug, PartialEq, Eq, FromPrimitive)] pub enum {{ c_name }} { {% for (name, _, _) in names -%} {{ name }} = {{ loop.index0 }}, diff --git a/src/languages/language_ccomment.rs b/src/languages/language_ccomment.rs index fc65c87cb..92c398207 100644 --- a/src/languages/language_ccomment.rs +++ b/src/languages/language_ccomment.rs @@ -2,7 +2,7 @@ use num_derive::FromPrimitive; -#[derive(Clone, Debug, PartialEq, FromPrimitive)] +#[derive(Clone, Debug, PartialEq, Eq, FromPrimitive)] pub enum Ccomment { End = 0, Nothing = 1, diff --git a/src/languages/language_cpp.rs b/src/languages/language_cpp.rs index 72789d918..fc1274f01 100644 --- a/src/languages/language_cpp.rs +++ b/src/languages/language_cpp.rs @@ -2,7 +2,7 @@ use num_derive::FromPrimitive; -#[derive(Clone, Debug, PartialEq, FromPrimitive)] +#[derive(Clone, Debug, PartialEq, Eq, FromPrimitive)] pub enum Cpp { End = 0, Identifier = 1, diff --git a/src/languages/language_java.rs b/src/languages/language_java.rs index 7a60983ff..c979bf90c 100644 --- a/src/languages/language_java.rs +++ b/src/languages/language_java.rs @@ -2,7 +2,7 @@ use num_derive::FromPrimitive; -#[derive(Clone, Debug, PartialEq, FromPrimitive)] +#[derive(Clone, Debug, PartialEq, Eq, FromPrimitive)] pub enum Java { End = 0, Identifier = 1, diff --git a/src/languages/language_javascript.rs b/src/languages/language_javascript.rs index b42507db2..60bea77c5 100644 --- a/src/languages/language_javascript.rs +++ b/src/languages/language_javascript.rs @@ -2,7 +2,7 @@ use num_derive::FromPrimitive; -#[derive(Clone, Debug, PartialEq, FromPrimitive)] +#[derive(Clone, Debug, PartialEq, Eq, FromPrimitive)] pub enum Javascript { End = 0, Identifier = 1, diff --git a/src/languages/language_mozjs.rs b/src/languages/language_mozjs.rs index f785c14fd..2a791d288 100644 --- a/src/languages/language_mozjs.rs +++ b/src/languages/language_mozjs.rs @@ -2,7 +2,7 @@ use num_derive::FromPrimitive; -#[derive(Clone, Debug, PartialEq, FromPrimitive)] +#[derive(Clone, Debug, PartialEq, Eq, FromPrimitive)] pub enum Mozjs { End = 0, Identifier = 1, diff --git a/src/languages/language_preproc.rs b/src/languages/language_preproc.rs index 1f55bba1f..19cf02581 100644 --- a/src/languages/language_preproc.rs +++ b/src/languages/language_preproc.rs @@ -2,7 +2,7 @@ use num_derive::FromPrimitive; -#[derive(Clone, Debug, PartialEq, FromPrimitive)] +#[derive(Clone, Debug, PartialEq, Eq, FromPrimitive)] pub enum Preproc { End = 0, Identifier = 1, diff --git a/src/languages/language_python.rs b/src/languages/language_python.rs index 153ffabb4..95bc1375a 100644 --- a/src/languages/language_python.rs +++ b/src/languages/language_python.rs @@ -2,7 +2,7 @@ use num_derive::FromPrimitive; -#[derive(Clone, Debug, PartialEq, FromPrimitive)] +#[derive(Clone, Debug, PartialEq, Eq, FromPrimitive)] pub enum Python { End = 0, Identifier = 1, diff --git a/src/languages/language_rust.rs b/src/languages/language_rust.rs index c29674b19..9120956b6 100644 --- a/src/languages/language_rust.rs +++ b/src/languages/language_rust.rs @@ -2,7 +2,7 @@ use num_derive::FromPrimitive; -#[derive(Clone, Debug, PartialEq, FromPrimitive)] +#[derive(Clone, Debug, PartialEq, Eq, FromPrimitive)] pub enum Rust { End = 0, Identifier = 1, diff --git a/src/languages/language_tsx.rs b/src/languages/language_tsx.rs index 5fca410be..fa5810b4c 100644 --- a/src/languages/language_tsx.rs +++ b/src/languages/language_tsx.rs @@ -2,7 +2,7 @@ use num_derive::FromPrimitive; -#[derive(Clone, Debug, PartialEq, FromPrimitive)] +#[derive(Clone, Debug, PartialEq, Eq, FromPrimitive)] pub enum Tsx { End = 0, Identifier = 1, diff --git a/src/languages/language_typescript.rs b/src/languages/language_typescript.rs index 89a34e351..d55e227ec 100644 --- a/src/languages/language_typescript.rs +++ b/src/languages/language_typescript.rs @@ -2,7 +2,7 @@ use num_derive::FromPrimitive; -#[derive(Clone, Debug, PartialEq, FromPrimitive)] +#[derive(Clone, Debug, PartialEq, Eq, FromPrimitive)] pub enum Typescript { End = 0, Identifier = 1, diff --git a/src/macros.rs b/src/macros.rs index bb62cd111..94da81dd5 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -46,7 +46,7 @@ macro_rules! get_language { macro_rules! mk_enum { ( $( $camel:ident, $description:expr ),* ) => { /// The list of supported languages. - #[derive(Clone, Copy, Debug, PartialEq)] + #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum LANG { $( #[doc = $description] diff --git a/src/spaces.rs b/src/spaces.rs index 53b3e3f49..459a6d391 100644 --- a/src/spaces.rs +++ b/src/spaces.rs @@ -23,7 +23,7 @@ use crate::dump_metrics::*; use crate::traits::*; /// The list of supported space kinds. -#[derive(Clone, Copy, Debug, Default, PartialEq, Serialize)] +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize)] #[serde(rename_all = "lowercase")] pub enum SpaceKind { /// An unknown space