From 1094bf7acfd3e8d2143f3cbc96dd0ef0b9c767e8 Mon Sep 17 00:00:00 2001 From: ghosind Date: Thu, 11 Aug 2022 23:45:54 +0800 Subject: [PATCH] fix: remove re-initilize ConcurrentHashSet's mutex field. --- concurrent_hashset.go | 1 - 1 file changed, 1 deletion(-) diff --git a/concurrent_hashset.go b/concurrent_hashset.go index e2f6d5c..5f35c8e 100644 --- a/concurrent_hashset.go +++ b/concurrent_hashset.go @@ -17,7 +17,6 @@ type ConcurrentHashSet[T comparable] struct { // NewConcurrentHashSet creates and returns am empty ConcurrentHashSet with the specified type. func NewConcurrentHashSet[T comparable]() *ConcurrentHashSet[T] { set := new(ConcurrentHashSet[T]) - set.mutex = sync.RWMutex{} set.data = NewHashSet[T]() return set