summaryrefslogtreecommitdiff
path: root/serde_v8
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2022-09-19 10:25:03 +0200
committerGitHub <noreply@github.com>2022-09-19 10:25:03 +0200
commitb1b418b81a13ede548273665e83c1bc5a97dffcd (patch)
tree731efb5a2811e1d925e94e9a8a16c220ac98de92 /serde_v8
parenta4a894fa1e933e8a678f8ad4f6353837859b02fd (diff)
chore: fix clippy warnings (#15944)
Stop allowing clippy::derive-partial-eq-without-eq and fix warnings about deriving PartialEq without also deriving Eq. In one case I removed the PartialEq because it a) wasn't necessary, and b) sketchy because it was comparing floating point numbers. IMO, that's a good argument for enforcing the lint rule, because it would most likely have been caught during review if it had been enabled.
Diffstat (limited to 'serde_v8')
-rw-r--r--serde_v8/error.rs2
-rw-r--r--serde_v8/tests/de.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/serde_v8/error.rs b/serde_v8/error.rs
index f6afc69df..661bb68ad 100644
--- a/serde_v8/error.rs
+++ b/serde_v8/error.rs
@@ -5,7 +5,7 @@ use serde::{de, ser};
pub type Result<T> = std::result::Result<T, Error>;
-#[derive(Clone, Debug, PartialEq)]
+#[derive(Clone, Debug, Eq, PartialEq)]
#[non_exhaustive]
pub enum Error {
Message(String),
diff --git a/serde_v8/tests/de.rs b/serde_v8/tests/de.rs
index 5ae104036..c29b35760 100644
--- a/serde_v8/tests/de.rs
+++ b/serde_v8/tests/de.rs
@@ -319,7 +319,7 @@ detest!(
defail!(defail_struct, MathOp, "123", |e| e
== Err(Error::ExpectedObject));
-#[derive(PartialEq, Debug, Deserialize)]
+#[derive(Eq, PartialEq, Debug, Deserialize)]
pub struct SomeThing {
pub a: String,
#[serde(default)]
@@ -339,7 +339,7 @@ detest!(de_bstr, ByteString, "'hello'", "hello".into());
defail!(defail_bstr, ByteString, "'👋bye'", |e| e
== Err(Error::ExpectedLatin1));
-#[derive(PartialEq, Debug, Deserialize)]
+#[derive(Eq, PartialEq, Debug, Deserialize)]
pub struct StructWithBytes {
#[serde(with = "serde_bytes")]
a: Vec<u8>,