From 7ac5721b49beac2ba9ecaa910241b24d51102f8b Mon Sep 17 00:00:00 2001 From: Elena Kolevska Date: Tue, 21 May 2024 01:56:04 +0100 Subject: [PATCH] Uses built in `clear` Signed-off-by: Elena Kolevska --- concurrency/mutexmap.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/concurrency/mutexmap.go b/concurrency/mutexmap.go index 35936fd..b00868b 100644 --- a/concurrency/mutexmap.go +++ b/concurrency/mutexmap.go @@ -108,7 +108,7 @@ func (a *mutexMap[T]) Delete(key T) { func (a *mutexMap[T]) Clear() { a.lock.Lock() - a.items = make(map[T]*sync.RWMutex) + clear(a.items) a.lock.Unlock() }