Merge pull request #428 from claire921/selector

pkg/selector: set the cap for slice in SelectorFromSet
pull/6/head
Clayton Coleman 2014-07-12 13:52:36 -04:00
commit 3fd730c5fe
1 changed files with 1 additions and 1 deletions

View File

@ -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})
}