Skip to content
Myr

Use fixed-length array when possible (#4488)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Ioannis Pinakoulakis · committed by GitHub · parent 978b625 · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:src/result.go+3 added-3 removed
126 unmodified lines
127 itemColors := result.item.Colors()128129 // No ANSI codes130 if len(itemColors) == 0 && len(nthOffsets) == 0 {131 var offsets []colorOffset132 for _, off := range matchOffsets {133 offsets = append(offsets, colorOffset{offset: [2]int32{off[0], off[1]}, color: colMatch, match: true})131 offsets := make([]colorOffset, len(matchOffsets))132 for i, off := range matchOffsets {133 offsets[i] = colorOffset{offset: [2]int32{off[0], off[1]}, color: colMatch, match: true}134 }135 return offsets136 }137
188 unmodified lines