summaryrefslogtreecommitdiff
path: root/ext/crypto/key.rs
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 /ext/crypto/key.rs
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 'ext/crypto/key.rs')
-rw-r--r--ext/crypto/key.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/crypto/key.rs b/ext/crypto/key.rs
index da73d2191..b8f87189e 100644
--- a/ext/crypto/key.rs
+++ b/ext/crypto/key.rs
@@ -17,7 +17,7 @@ pub enum KeyType {
Secret,
}
-#[derive(Serialize, Deserialize, Copy, Clone, PartialEq)]
+#[derive(Serialize, Deserialize, Copy, Clone, Eq, PartialEq)]
pub enum CryptoHash {
#[serde(rename = "SHA-1")]
Sha1,
@@ -98,7 +98,7 @@ impl hkdf::KeyType for HkdfOutput<usize> {
}
}
-#[derive(Serialize, Deserialize, Copy, Clone, Debug, PartialEq)]
+#[derive(Serialize, Deserialize, Copy, Clone, Debug, Eq, PartialEq)]
#[serde(rename_all = "camelCase")]
pub enum KeyUsage {
Encrypt,