fix(list): preserve receiver contents in SubList (#410)

This commit is contained in:
Rupayon Haldar authored and GitHub committed 2026-10-31 09:53:45 +08:00
1 parent eb4b10cc15
commit f7acd40303
2 files changed
+40 -1

No files matched your search

-1
View File
@@ -374,6 +374,5 @@ func (c *CopyOnWriteList[T]) SubList(start int, end int) (newList []T) {
}
newList = make([]T, end-start)
copy(newList, list[start:end])
c.setList(newList)
return
}