diff --git a/set/OWNERS b/set/OWNERS index 34bce769..9d2d33e7 100644 --- a/set/OWNERS +++ b/set/OWNERS @@ -3,8 +3,6 @@ reviewers: - logicalhan - thockin - - lavalamp approvers: - logicalhan - thockin - - lavalamp \ No newline at end of file diff --git a/set/ordered.go b/set/ordered.go index c7acaaec..6e5c6db3 100644 --- a/set/ordered.go +++ b/set/ordered.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Kubernetes Authors. +Copyright 2023 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/set/set.go b/set/set.go index 97d829b6..b115d0b7 100644 --- a/set/set.go +++ b/set/set.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Kubernetes Authors. +Copyright 2023 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -210,8 +210,8 @@ func (s Set[T]) Clone() Set[T] { // s2 = {a1, a2, a4, a5} // s1.SymmetricDifference(s2) = {a3, a4, a5} // s2.SymmetricDifference(s1) = {a3, a4, a5} -func (s1 Set[T]) SymmetricDifference(s2 Set[T]) Set[T] { - return s1.Difference(s2).Union(s2.Difference(s1)) +func (s Set[T]) SymmetricDifference(s2 Set[T]) Set[T] { + return s.Difference(s2).Union(s2.Difference(s)) } // Clear empties the set. diff --git a/set/set_test.go b/set/set_test.go index 02f923a7..c910ce0a 100644 --- a/set/set_test.go +++ b/set/set_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors. +Copyright 2023 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.