Skip to content

Commit

Permalink
Merge pull request #13 from morrowc/master
Browse files Browse the repository at this point in the history
Department of Redundancy Department called.
  • Loading branch information
armon authored Nov 18, 2022
2 parents afe6328 + 2edd43f commit f65831e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions radix.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func longestPrefix(k1, k2 string) int {
}

// Insert is used to add a newentry or update
// an existing entry. Returns if updated.
// an existing entry. Returns true if an existing record is updated.
func (t *Tree) Insert(s string, v interface{}) (interface{}, bool) {
var parent *node
n := t.root
Expand Down Expand Up @@ -219,7 +219,7 @@ func (t *Tree) Insert(s string, v interface{}) (interface{}, bool) {
val: v,
}

// If the new key is a subset, add to to this node
// If the new key is a subset, add to this node
search = search[commonPrefix:]
if len(search) == 0 {
child.leaf = leaf
Expand Down

0 comments on commit f65831e

Please sign in to comment.