summaryrefslogtreecommitdiff
path: root/src/layout
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-01-24 16:38:34 +0100
committerLaurenz <laurmaedje@gmail.com>2022-01-24 16:44:52 +0100
commitdb158719d67fdef1d2c76300fb232cf2d4bfb35d (patch)
tree3704d2c3b37521e1ecae75c3246fd5573537b378 /src/layout
parent36cae88799722fe873b578114d24201db8903d67 (diff)
Simplify CLI
Diffstat (limited to 'src/layout')
-rw-r--r--src/layout/incremental.rs2
1 files changed, 2 insertions, 0 deletions
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,