Update vendor

This commit is contained in:
jennybuckley
2019-07-29 16:05:17 -07:00
committed by Jennifer Buckley
parent c7c1a99e8e
commit b7649db53a
8 changed files with 608 additions and 11 deletions

View File

@@ -173,9 +173,17 @@ type setNode struct {
// SetNodeMap is a map of PathElement to subset.
type SetNodeMap struct {
members []setNode
members sortedSetNode
}
type sortedSetNode []setNode
// Implement the sort interface; this would permit bulk creation, which would
// be faster than doing it one at a time via Insert.
func (s sortedSetNode) Len() int { return len(s) }
func (s sortedSetNode) Less(i, j int) bool { return s[i].pathElement.Less(s[j].pathElement) }
func (s sortedSetNode) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
// Descend adds pe to the set if necessary, returning the associated subset.
func (s *SetNodeMap) Descend(pe PathElement) *Set {
loc := sort.Search(len(s.members), func(i int) bool {