summaryrefslogtreecommitdiff
path: root/cli/tools/test.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 /cli/tools/test.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 'cli/tools/test.rs')
-rw-r--r--cli/tools/test.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/cli/tools/test.rs b/cli/tools/test.rs
index cb5b41042..dca140445 100644
--- a/cli/tools/test.rs
+++ b/cli/tools/test.rs
@@ -59,7 +59,7 @@ use tokio::sync::mpsc::unbounded_channel;
use tokio::sync::mpsc::UnboundedSender;
/// The test mode is used to determine how a specifier is to be tested.
-#[derive(Debug, Clone, PartialEq)]
+#[derive(Debug, Clone, Eq, PartialEq)]
pub enum TestMode {
/// Test as documentation, type-checking fenced code blocks.
Documentation,
@@ -144,13 +144,14 @@ impl TestDescription {
}
}
-#[derive(Debug, Clone, PartialEq, Deserialize)]
+#[derive(Debug, Clone, Eq, PartialEq, Deserialize)]
#[serde(rename_all = "camelCase")]
pub enum TestOutput {
String(String),
Bytes(Vec<u8>),
}
+#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, Clone, PartialEq, Deserialize)]
#[serde(rename_all = "camelCase")]
pub enum TestResult {
@@ -160,7 +161,7 @@ pub enum TestResult {
Cancelled,
}
-#[derive(Debug, Clone, PartialEq, Deserialize)]
+#[derive(Debug, Clone, Eq, PartialEq, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct TestStepDescription {
pub id: usize,
@@ -183,6 +184,7 @@ impl TestStepDescription {
}
}
+#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, Clone, PartialEq, Deserialize)]
#[serde(rename_all = "camelCase")]
pub enum TestStepResult {
@@ -202,7 +204,7 @@ impl TestStepResult {
}
}
-#[derive(Debug, Clone, PartialEq, Deserialize)]
+#[derive(Debug, Clone, Eq, PartialEq, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct TestPlan {
pub origin: String,