From 4ed6afdb3a1f52b7ef468391750983557c5c73b4 Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Mon, 1 Aug 2016 20:06:05 +0000 Subject: [PATCH] Review feedback --- report/metrics.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/report/metrics.go b/report/metrics.go index 1d17e731c..b6b8b7a73 100644 --- a/report/metrics.go +++ b/report/metrics.go @@ -24,7 +24,7 @@ func (m Metrics) Merge(other Metrics) Metrics { if rv, ok := result[k]; ok { result[k] = rv.Merge(v) } else { - result[k] = v.Copy() + result[k] = v } } return result @@ -140,9 +140,9 @@ func (m Metric) Merge(other Metric) Metric { // Optimize the empty and non-overlapping case since they are very common switch { case len(m.Samples) == 0: - return other.Copy() + return other case len(other.Samples) == 0: - return m.Copy() + return m case other.First.After(m.Last): samplesOut := make([]Sample, len(m.Samples)+len(other.Samples)) copy(samplesOut, m.Samples)