diff --git a/enterprise/b/containers_btree.go b/enterprise/b/containers_btree.go index b082f3c8b..634e7725c 100644 --- a/enterprise/b/containers_btree.go +++ b/enterprise/b/containers_btree.go @@ -133,7 +133,7 @@ func (btc *BTreeContainers) Size() int { return btc.tree.Len() } -func (btc *BTreeContainers) Iterator(key uint64) (citer roaring.Contiterator, found bool) { +func (btc *BTreeContainers) Iterator(key uint64) (citer roaring.ContainerIterator, found bool) { e, ok := btc.tree.Seek(key) if ok { found = true diff --git a/roaring/containers.go b/roaring/containers.go index f91360ee3..ac523676c 100644 --- a/roaring/containers.go +++ b/roaring/containers.go @@ -120,7 +120,7 @@ func (sc *SliceContainers) seek(key uint64) (int, bool) { return i, found } -func (sc *SliceContainers) Iterator(key uint64) (citer Contiterator, found bool) { +func (sc *SliceContainers) Iterator(key uint64) (citer ContainerIterator, found bool) { i, found := sc.seek(key) return &SliceIterator{e: sc, i: i}, found } diff --git a/roaring/roaring.go b/roaring/roaring.go index 88dbf3c31..ce0e6753b 100644 --- a/roaring/roaring.go +++ b/roaring/roaring.go @@ -93,10 +93,10 @@ type Containers interface { // Iterator returns a Contiterator which after a call to Next(), a call to Value() will // return the first container at or after key. found will be true if a // container is found at key. - Iterator(key uint64) (citer Contiterator, found bool) + Iterator(key uint64) (citer ContainerIterator, found bool) } -type Contiterator interface { +type ContainerIterator interface { Next() bool Value() (uint64, *Container) } @@ -798,7 +798,7 @@ type BitmapInfo struct { // Iterator represents an iterator over a Bitmap. type Iterator struct { bitmap *Bitmap - citer Contiterator + citer ContainerIterator key uint64 c *Container j, k int // i: container; j: array index, bit index, or run index; k: offset within the run