Skip to content

Commit

Permalink
Merge pull request #660 from prometheus/beorn7/nit
Browse files Browse the repository at this point in the history
Simplify code
  • Loading branch information
beorn7 authored Oct 16, 2019
2 parents 39fc195 + 679da92 commit b292466
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion prometheus/histogram.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func newHistogram(desc *Desc, opts HistogramOpts, labelValues ...string) Histogr
desc: desc,
upperBounds: opts.Buckets,
labelPairs: makeLabelPairs(desc, labelValues),
counts: [2]*histogramCounts{&histogramCounts{}, &histogramCounts{}},
counts: [2]*histogramCounts{{}, {}},
}
for i, upperBound := range h.upperBounds {
if i < len(h.upperBounds)-1 {
Expand Down
2 changes: 1 addition & 1 deletion prometheus/summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func newSummary(desc *Desc, opts SummaryOpts, labelValues ...string) Summary {
s := &noObjectivesSummary{
desc: desc,
labelPairs: makeLabelPairs(desc, labelValues),
counts: [2]*summaryCounts{&summaryCounts{}, &summaryCounts{}},
counts: [2]*summaryCounts{{}, {}},
}
s.init(s) // Init self-collection.
return s
Expand Down

0 comments on commit b292466

Please sign in to comment.