mirror of
https://github.com/duke-git/lancet.git
synced 2026-11-16 05:12:11 +08:00
fix(list): preserve receiver contents in SubList (#410)
This commit is contained in:
1 parent
eb4b10cc15
commit
f7acd40303
2 files changed
+40
-1
No files matched your search
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user