common/prque: remove unreachable offset==blockSize branch in Push

This commit is contained in:
Forostovec 2025-09-10 18:28:08 +03:00 committed by GitHub
parent b708feb9c3
commit ce175c948a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -57,9 +57,6 @@ func (s *sstack[P, V]) Push(data any) {
s.blocks = append(s.blocks, s.active) s.blocks = append(s.blocks, s.active)
s.capacity += blockSize s.capacity += blockSize
s.offset = 0 s.offset = 0
} else if s.offset == blockSize {
s.active = s.blocks[s.size/blockSize]
s.offset = 0
} }
if s.setIndex != nil { if s.setIndex != nil {
s.setIndex(data.(*item[P, V]).value, s.size) s.setIndex(data.(*item[P, V]).value, s.size)