mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-06 12:21:21 -05:00
Bumps [github.com/blevesearch/bleve/v2](https://github.com/blevesearch/bleve) from 2.4.4 to 2.5.0. - [Release notes](https://github.com/blevesearch/bleve/releases) - [Commits](https://github.com/blevesearch/bleve/compare/v2.4.4...v2.5.0) --- updated-dependencies: - dependency-name: github.com/blevesearch/bleve/v2 dependency-version: 2.5.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
24 lines
433 B
Go
24 lines
433 B
Go
//go:build go1.23
|
|
// +build go1.23
|
|
|
|
package bitset
|
|
|
|
import (
|
|
"iter"
|
|
"math/bits"
|
|
)
|
|
|
|
func (b *BitSet) EachSet() iter.Seq[uint] {
|
|
return func(yield func(uint) bool) {
|
|
for wordIndex, word := range b.set {
|
|
idx := 0
|
|
for trail := bits.TrailingZeros64(word); trail != 64; trail = bits.TrailingZeros64(word >> idx) {
|
|
if !yield(uint(wordIndex<<log2WordSize + idx + trail)) {
|
|
return
|
|
}
|
|
idx += trail + 1
|
|
}
|
|
}
|
|
}
|
|
}
|