fix(io-metrics): simplify early eviction check (#7383)

Replace a needless bool return with the equivalent predicate so clippy can pass with warnings denied.

Co-authored-by: zhi22915 <qiuzgang@gmail.com>
This commit is contained in:
houseme
2026-09-07 18:12:00 +08:00
committed by GitHub
parent 95e6c89c1c
commit b370e746a0
+1 -4
View File
@@ -241,10 +241,7 @@ impl AdaptiveTTL {
// 1. Item is cold (low access count)
// 2. Age is significant (> 50% of TTL)
// 3. No recent accesses
if access_count <= self.cold_threshold && age > current_ttl / 2 {
return true;
}
false
access_count <= self.cold_threshold && age > current_ttl / 2
}
/// Calculate priority score for an item.