mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Fix #6615
This commit is contained in:
@@ -60,6 +60,9 @@ func (self *Set[T]) AsSlice() []T {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (self *Set[T]) Intersect(other *Set[T]) (ans *Set[T]) {
|
func (self *Set[T]) Intersect(other *Set[T]) (ans *Set[T]) {
|
||||||
|
if other == nil {
|
||||||
|
return NewSet[T]()
|
||||||
|
}
|
||||||
if self.Len() < other.Len() {
|
if self.Len() < other.Len() {
|
||||||
ans = NewSet[T](self.Len())
|
ans = NewSet[T](self.Len())
|
||||||
for x := range self.items {
|
for x := range self.items {
|
||||||
|
|||||||
Reference in New Issue
Block a user