Skip to content

Commit c60edc5

Browse files
committed
Revert "make sure slice has the right size"
This reverts commit d152e458b9cb7251c9db5da2fb7203c408e5b71f.
1 parent 33d06bd commit c60edc5

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

roaring.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"encoding/base64"
1111
"fmt"
1212
"io"
13-
"slices"
1413
"strconv"
1514

1615
"github.com/RoaringBitmap/roaring/v2/internal"
@@ -443,9 +442,6 @@ func (rb *Bitmap) toArray(array *[]uint32) *[]uint32 {
443442
// slice that is given to ToExistingArray. It is the callers duty to make sure the slice
444443
// has the right size.
445444
func (rb *Bitmap) ToExistingArray(array *[]uint32) *[]uint32 {
446-
size := int(rb.GetCardinality())
447-
*array = slices.Grow(*array, size)
448-
*array = (*array)[:size]
449445
return rb.toArray(array)
450446
}
451447

0 commit comments

Comments
 (0)