瀏覽代碼

Update go-patricia to 2.2.6

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Justin Cormack 9 年之前
父節點
當前提交
d16f96262e
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 1 1
      hack/vendor.sh
  2. 2 1
      vendor/src/github.com/tchap/go-patricia/patricia/children.go

+ 1 - 1
hack/vendor.sh

@@ -53,7 +53,7 @@ clone git github.com/gorilla/mux v1.1
 clone git github.com/kr/pty 5cf931ef8f
 clone git github.com/mattn/go-shellwords v1.0.0
 clone git github.com/mattn/go-sqlite3 v1.1.0
-clone git github.com/tchap/go-patricia v2.2.5
+clone git github.com/tchap/go-patricia v2.2.6
 clone git github.com/vdemeester/shakers 24d7f1d6a71aa5d9cbe7390e4afb66b7eef9e1b3
 # forked golang.org/x/net package includes a patch for lazy loading trace templates
 clone git golang.org/x/net 2beffdc2e92c8a3027590f898fe88f69af48a3f8 https://github.com/tonistiigi/net.git

+ 2 - 1
vendor/src/github.com/tchap/go-patricia/patricia/children.go

@@ -70,7 +70,8 @@ func (list *sparseChildList) add(child *Trie) childList {
 func (list *sparseChildList) remove(b byte) {
 	for i, node := range list.children {
 		if node.prefix[0] == b {
-			copy(list.children[i:], list.children[i+1:])
+			list.children[i] = list.children[len(list.children)-1]
+			list.children[len(list.children)-1] = nil
 			list.children = list.children[:len(list.children)-1]
 			return
 		}