[chore] Upgrade wasm-sqlite to v0.16.2 (#2997)

This commit is contained in:
Daenney
2024-06-12 14:21:34 +02:00
committed by GitHub
parent dcf825bd87
commit 978b4176f1
55 changed files with 1075 additions and 1040 deletions

View File

@ -69,7 +69,7 @@ type IDedPool[T any] struct {
// NewIDedPool returns a new IDedPool.
func NewIDedPool[T any](resetFn func(*T)) IDedPool[T] {
return IDedPool[T]{pool: NewPool[T](resetFn)}
return IDedPool[T]{pool: NewPool[T](resetFn), maxIDEncountered: -1}
}
// GetOrAllocate returns the T with the given id.
@ -97,7 +97,7 @@ func (p *IDedPool[T]) Get(id int) *T {
// Reset resets the pool.
func (p *IDedPool[T]) Reset() {
p.pool.Reset()
for i := range p.idToItems {
for i := 0; i <= p.maxIDEncountered; i++ {
p.idToItems[i] = nil
}
p.maxIDEncountered = -1