Skip to content

Commit

Permalink
fix: remove re-initilize ConcurrentHashSet's mutex field.
Browse files Browse the repository at this point in the history
  • Loading branch information
ghosind committed Aug 11, 2022
1 parent 1000cf5 commit 1094bf7
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion concurrent_hashset.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1094bf7

Please sign in to comment.