From 858c496b0918135b757d5442caa9e028e17896f2 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Thu, 16 May 2024 17:43:56 -0700 Subject: [PATCH] metrics: fix dead_code warning in test BUG=b:344974550 TEST=tools/clippy Change-Id: I73016330a52cdee7d518892d33012c0eb99f4f79 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5609073 Commit-Queue: Daniel Verkamp Reviewed-by: Alexandre Courbot --- metrics/src/local_stats.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/metrics/src/local_stats.rs b/metrics/src/local_stats.rs index fb0479677f..3b32ed6e2c 100644 --- a/metrics/src/local_stats.rs +++ b/metrics/src/local_stats.rs @@ -600,8 +600,11 @@ mod tests { assert_eq!(histogram.values, None); } + #[cfg(feature = "experimental")] #[derive(Clone, Debug, PartialEq)] struct MyDetails(u64, u64); + + #[cfg(feature = "experimental")] impl Details for MyDetails { fn value(&self) -> u64 { self.1 - self.0