Skip to content

Commit 01a70e0

Browse files
committed
...
1 parent 0614f05 commit 01a70e0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

kittens/diff/patch.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,8 @@ func is_non_blank(text string) bool {
461461

462462
func (self *Patch) detect_moved_lines(left_lines, right_lines []string) {
463463
// Build maps from line text to lists of line numbers for removed and added lines.
464-
removed := make(map[string][]int) // text -> left line numbers
465-
added := make(map[string][]int) // text -> right line numbers
464+
removed := make(map[string][]int, len(left_lines)) // text -> left line numbers
465+
added := make(map[string][]int, len(right_lines)) // text -> right line numbers
466466
for _, hunk := range self.all_hunks {
467467
for _, chunk := range hunk.chunks {
468468
if !chunk.is_context {

0 commit comments

Comments
 (0)