apply go fix for Go 1.26

This applies the `go fix` recommendations for go1.26
This commit is contained in:
Wade Simmons
2026-09-01 11:39:02 -04:00
parent dd8f660c0a
commit ae0fa0f2af
4 changed files with 8 additions and 18 deletions
+2 -8
View File
@@ -79,10 +79,7 @@ func (b *Bits) clearRange(startPos, count uint64) uint64 {
// handle the potential partial word before pos becomes u64 aligned
word := pos >> 6
bit := pos & 63
take := uint64(64) - bit
if take > remaining {
take = remaining
}
take := min(uint64(64)-bit, remaining)
if take > b.length-pos {
take = b.length - pos
}
@@ -189,10 +186,7 @@ func (b *Bits) Update(l *slog.Logger, i uint64) bool {
func (b *Bits) updateSlow(l *slog.Logger, i uint64) bool {
// If i is a jump, adjust the window, record lost, update current, and return true
if i > b.current {
end := i
if end > b.current+b.length {
end = b.current + b.length
}
end := min(i, b.current+b.length)
count := end - b.current
startPos := (b.current + 1) & b.lengthMask