Skip to content

Commit

Permalink
Uses built in clear
Browse files Browse the repository at this point in the history
Signed-off-by: Elena Kolevska <[email protected]>
  • Loading branch information
elena-kolevska committed May 21, 2024
1 parent 64ed1be commit 7ac5721
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion concurrency/mutexmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down

0 comments on commit 7ac5721

Please sign in to comment.