Skip to content

Commit b292466

Browse files
authored
Merge pull request #660 from prometheus/beorn7/nit
Simplify code
2 parents 39fc195 + 679da92 commit b292466

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

prometheus/histogram.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func newHistogram(desc *Desc, opts HistogramOpts, labelValues ...string) Histogr
187187
desc: desc,
188188
upperBounds: opts.Buckets,
189189
labelPairs: makeLabelPairs(desc, labelValues),
190-
counts: [2]*histogramCounts{&histogramCounts{}, &histogramCounts{}},
190+
counts: [2]*histogramCounts{{}, {}},
191191
}
192192
for i, upperBound := range h.upperBounds {
193193
if i < len(h.upperBounds)-1 {

prometheus/summary.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ func newSummary(desc *Desc, opts SummaryOpts, labelValues ...string) Summary {
208208
s := &noObjectivesSummary{
209209
desc: desc,
210210
labelPairs: makeLabelPairs(desc, labelValues),
211-
counts: [2]*summaryCounts{&summaryCounts{}, &summaryCounts{}},
211+
counts: [2]*summaryCounts{{}, {}},
212212
}
213213
s.init(s) // Init self-collection.
214214
return s

0 commit comments

Comments
 (0)