From 3b3a9912b98c1c2fca112aaf9653994d405839b7 Mon Sep 17 00:00:00 2001 From: Toby Lawrence Date: Sun, 24 Dec 2023 11:55:04 -0500 Subject: [PATCH] chore: clean up some clippy lints --- metrics-util/src/layers/filter.rs | 2 +- metrics/src/common.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/metrics-util/src/layers/filter.rs b/metrics-util/src/layers/filter.rs index f7125605..4d0db28b 100644 --- a/metrics-util/src/layers/filter.rs +++ b/metrics-util/src/layers/filter.rs @@ -140,7 +140,7 @@ impl Layer for FilterLayer { let mut automaton_builder = AhoCorasickBuilder::new(); let automaton = automaton_builder .ascii_case_insensitive(self.case_insensitive) - .kind(self.use_dfa.then(|| AhoCorasickKind::DFA)) + .kind(self.use_dfa.then_some(AhoCorasickKind::DFA)) .build(&self.patterns) // Documentation for `AhoCorasickBuilder::build` states that the error here will be // related to exceeding some internal limits, but that those limits should generally be diff --git a/metrics/src/common.rs b/metrics/src/common.rs index 6cabedc0..2cc1d7fd 100644 --- a/metrics/src/common.rs +++ b/metrics/src/common.rs @@ -62,7 +62,7 @@ impl GaugeValue { /// /// While metrics do not necessarily need to be tied to a particular unit to be recorded, some /// downstream systems natively support defining units and so they can be specified during registration. -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, Eq, PartialEq)] pub enum Unit { /// Count. Count,