Browse Source

代码优化

master
Sydonian 5 months ago
parent
commit
a20a4b108e
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      pkgs/trie/trie.go

+ 1
- 0
pkgs/trie/trie.go View File

@@ -103,6 +103,7 @@ func (n *Node[T]) RemoveSelf(cleanParent bool) {

// 修改时需要注意允许在visitorFn中删除当前节点
func (n *Node[T]) Iterate(visitorFn func(path []string, node *Node[T], isWordNode bool) VisitCtrl) {
visitorFn([]string{}, n, true)
n.iterate([]string{}, visitorFn)
}



Loading…
Cancel
Save