Skip to content

Commit b40c6f6

Browse files
committed
Fix #7
<= is the right check - < is too strict, and that 'strictness' is only required when done inside the 'if self.nodes.len() >= self.capacity {' block above, to confirm evict() did evict an item. The line was moved around, but I failed to git add the fixed condition.
1 parent a4ecc92 commit b40c6f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ impl<K: Eq + Hash + Clone, V> SieveCache<K, V> {
437437
self.nodes.push(node);
438438
let idx = self.nodes.len() - 1;
439439
self.map.insert(key, idx);
440-
debug_assert!(self.nodes.len() < self.capacity);
440+
debug_assert!(self.nodes.len() <= self.capacity);
441441
true
442442
}
443443

0 commit comments

Comments
 (0)