Skip to content

Commit

Permalink
fix slice allocation to be size 0 cap len(fb.termsCount)
Browse files Browse the repository at this point in the history
  • Loading branch information
mschoch committed Dec 1, 2014
1 parent 15fd802 commit efebc07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion search/facets/facet_builder_terms.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (fb *TermsFacetBuilder) Result() *search.FacetResult {
Missing: fb.missing,
}

rv.Terms = make([]*search.TermFacet, len(fb.termsCount))
rv.Terms = make([]*search.TermFacet, 0, len(fb.termsCount))

for term, count := range fb.termsCount {
tf := &search.TermFacet{
Expand Down

0 comments on commit efebc07

Please sign in to comment.