Skip to content

Commit

Permalink
Update Set[E].Equal method
Browse files Browse the repository at this point in the history
  • Loading branch information
b97tsk committed Jan 23, 2024
1 parent 4dfd528 commit 487bbe8
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions intervalset.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,17 +261,7 @@ func (x Set[E]) ContainsRange(lo, hi E) bool {

// Equal reports whether x is identical to y.
func (x Set[E]) Equal(y Set[E]) bool {
if len(x) != len(y) {
return false
}

for i := range x {
if !x[i].Equal(y[i]) {
return false
}
}

return true
return slices.EqualFunc(x, y, Interval[E].Equal)
}

// Extent returns the smallest Interval that contains every element in x.
Expand Down

0 comments on commit 487bbe8

Please sign in to comment.