parent
b961d742c1
commit
6c52907f2b
@ -40,6 +40,9 @@ func (c *collectStoreHeap) RemoveLast() *search.DocumentMatch {
|
|||||||
func (c *collectStoreHeap) Final(skip int, fixup collectorFixup) (search.DocumentMatchCollection, error) {
|
func (c *collectStoreHeap) Final(skip int, fixup collectorFixup) (search.DocumentMatchCollection, error) {
|
||||||
count := c.Len()
|
count := c.Len()
|
||||||
size := count - skip
|
size := count - skip
|
||||||
|
if size <= 0 {
|
||||||
|
return make(search.DocumentMatchCollection, 0), nil
|
||||||
|
}
|
||||||
rv := make(search.DocumentMatchCollection, size)
|
rv := make(search.DocumentMatchCollection, size)
|
||||||
for count > 0 {
|
for count > 0 {
|
||||||
count--
|
count--
|
||||||
|
Loading…
Reference in New Issue
Block a user