Fix last merge

This commit is contained in:
tidwall 2021-07-10 19:29:25 -07:00
parent f2bbf10c36
commit 991963268a
2 changed files with 4 additions and 4 deletions

View File

@ -419,7 +419,6 @@ Developer Options:
if showThreadsDisabled { if showThreadsDisabled {
log.Warnf("thread flag is deprecated use GOMAXPROCS to set number of threads instead") log.Warnf("thread flag is deprecated use GOMAXPROCS to set number of threads instead")
} }
if err := server.Serve(host, port, dir, httpTransport, *metricsAddr); err != nil { if err := server.Serve(host, port, dir, httpTransport, *metricsAddr); err != nil {
log.Fatal(err) log.Fatal(err)
} }

View File

@ -62,8 +62,9 @@ type Collection struct {
// New creates an empty collection // New creates an empty collection
func New() *Collection { func New() *Collection {
col := &Collection{ col := &Collection{
index: geoindex.Wrap(&rbang.RTree{}), items: btree.New(byID),
values: btree.New(32, nil), index: geoindex.Wrap(&rtree.RTree{}),
values: btree.New(byValue),
fieldMap: make(map[string]int), fieldMap: make(map[string]int),
fieldArr: make([]string, 0), fieldArr: make([]string, 0),
fieldValues: &fieldValues{}, fieldValues: &fieldValues{},
@ -354,7 +355,7 @@ func (c *Collection) Scan(
return true return true
} }
nextStep(count, cursor, deadline) nextStep(count, cursor, deadline)
iitm := value.(*itemT) iitm := item.(*itemT)
keepon = iterator(iitm.id, iitm.obj, c.fieldValues.get(iitm.fieldValuesSlot)) keepon = iterator(iitm.id, iitm.obj, c.fieldValues.get(iitm.fieldValuesSlot))
return keepon return keepon
} }