From db158719d67fdef1d2c76300fb232cf2d4bfb35d Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 24 Jan 2022 16:38:34 +0100 Subject: Simplify CLI --- src/layout/incremental.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/layout') diff --git a/src/layout/incremental.rs b/src/layout/incremental.rs index 4c046051..f737a3ef 100644 --- a/src/layout/incremental.rs +++ b/src/layout/incremental.rs @@ -150,6 +150,7 @@ impl LayoutCache { entries.retain(|f| f.hits() as f64 / f.age() as f64 > threshold); } } + #[cfg(feature = "rand")] EvictionPolicy::Random => { // Fraction of items that should be kept. let threshold = self.max_size as f64 / len as f64; @@ -340,6 +341,7 @@ pub enum EvictionPolicy { /// Evict the least frequently used item. LeastFrequentlyUsed, /// Evict randomly. + #[cfg(feature = "rand")] Random, /// Use the pattern verdicts. Patterns, -- cgit v1.2.3