Commit 2b183943 authored by Claire Li's avatar Claire Li

pkg/selector: set the cap for slice in SelectorFromSet

parent 89655584
......@@ -89,7 +89,7 @@ func try(selectorPiece, op string) (lhs, rhs string, ok bool) {
// Given a Set, return a Selector which will match exactly that Set.
func SelectorFromSet(ls Set) Selector {
var items []Selector
items := make([]Selector, 0, len(ls))
for label, value := range ls {
items = append(items, &hasTerm{label: label, value: value})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment