mirror of
https://github.com/rustfs/rustfs.git
synced 2026-09-07 20:46:11 +00:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user