From 6d8cafd2f64fe3cd66b7530d95df066b00bdd777 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Thu, 1 Aug 2019 23:37:55 +0200 Subject: Simplify code (#149) - No need to wrap ToUpper & Fields - Simpler concatenation - Easier pointer access --- cmp/report_slices.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmp/report_slices.go') diff --git a/cmp/report_slices.go b/cmp/report_slices.go index 8cb3265..667a6e3 100644 --- a/cmp/report_slices.go +++ b/cmp/report_slices.go @@ -322,7 +322,7 @@ func coalesceInterveningIdentical(groups []diffStats, windowSize int) []diffStat hadX, hadY := prev.NumRemoved > 0, prev.NumInserted > 0 hasX, hasY := next.NumRemoved > 0, next.NumInserted > 0 if ((hadX || hasX) && (hadY || hasY)) && curr.NumIdentical <= windowSize { - *prev = (*prev).Append(*curr).Append(*next) + *prev = prev.Append(*curr).Append(*next) groups = groups[:len(groups)-1] // Truncate off equal group continue } -- cgit v1.2.3