Skip to content

Commit

Permalink
Remove unnecessary "comparable" constraint (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
atlasgurus authored Dec 19, 2022
1 parent 30e7a48 commit b8c944d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hashset/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func New[K any](capacity uint64, equals g.EqualsFn[K], hash g.HashFn[K]) *Set[K]
}

// Of returns a new hashset initialized with the given 'vals'
func Of[K comparable](capacity uint64, equals g.EqualsFn[K], hash g.HashFn[K], vals ...K) *Set[K] {
func Of[K any](capacity uint64, equals g.EqualsFn[K], hash g.HashFn[K], vals ...K) *Set[K] {
s := New[K](capacity, equals, hash)
for _, val := range vals {
s.Put(val)
Expand Down

0 comments on commit b8c944d

Please sign in to comment.