diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2022-09-19 10:25:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-19 10:25:03 +0200 |
commit | b1b418b81a13ede548273665e83c1bc5a97dffcd (patch) | |
tree | 731efb5a2811e1d925e94e9a8a16c220ac98de92 /cli/tools/bench.rs | |
parent | a4a894fa1e933e8a678f8ad4f6353837859b02fd (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/bench.rs')
-rw-r--r-- | cli/tools/bench.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/tools/bench.rs b/cli/tools/bench.rs index ccff3d615..55e98a8b9 100644 --- a/cli/tools/bench.rs +++ b/cli/tools/bench.rs @@ -41,7 +41,7 @@ struct BenchSpecifierOptions { filter: Option<String>, } -#[derive(Debug, Clone, PartialEq, Deserialize)] +#[derive(Debug, Clone, Eq, PartialEq, Deserialize)] #[serde(rename_all = "camelCase")] pub struct BenchPlan { pub total: usize, @@ -60,7 +60,7 @@ pub enum BenchEvent { Result(usize, BenchResult), } -#[derive(Debug, Clone, PartialEq, Deserialize)] +#[derive(Debug, Clone, Deserialize)] #[serde(rename_all = "camelCase")] pub enum BenchResult { Ok(BenchStats), @@ -84,7 +84,7 @@ pub struct BenchDescription { pub group: Option<String>, } -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[derive(Debug, Clone, Serialize, Deserialize)] pub struct BenchStats { pub n: u64, pub min: f64, |