chore: use range

This commit is contained in:
andig 2024-10-23 16:04:40 +02:00
parent 3d463d40d4
commit b86f3bf183
4 changed files with 4 additions and 4 deletions

View file

@ -19,7 +19,7 @@ type handler struct {
func bytesAsUint16(b []byte) []uint16 {
u := make([]uint16, 0, len(b)/2)
for i := 0; i < len(b)/2; i++ {
for i := range len(b) / 2 {
u = append(u, binary.BigEndian.Uint16(b[2*i:]))
}
return u