From 68b924ebf91a26b4f1f2ed028ed0d415bf7b0395 Mon Sep 17 00:00:00 2001 From: knbr13 Date: Sat, 6 Apr 2024 16:24:58 +0300 Subject: [PATCH] add missing 'break' statement --- mcache.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mcache.go b/mcache.go index 75ac427..85718a0 100644 --- a/mcache.go +++ b/mcache.go @@ -269,10 +269,10 @@ func (c *MCache[K, V]) evict(i int) { if i > len(c.m) { i = len(c.m) } - for counter < i { + for ; counter < i; counter++ { for k := range c.m { delete(c.m, k) - counter++ + break } } }