RoaringBitmap/gocroaring

`func (rb *Bitmap) String() string` prints instead of returning string

maciej opened this issue · 1 comments

package main

import "github.com/RoaringBitmap/gocroaring"

func main() {
	gocroaring.New(1,2,3).String()
}

The above code prints {1,2,3}. The returned string is empty.

Fixed in v0.2.2.

It is a case where I copied and pasted from stack overflow, but the code does not do what it is supposed to be doing it seems. In any case, it was a hack.

The new code is better, but it uses more memory. We need to implement iterators in CRoaring to fix that though. (Not a hard thing to do, but nobody has gotten around to doing it.)