Skip to content

Commit

Permalink
std: switch memory store to TlvStr
Browse files Browse the repository at this point in the history
  • Loading branch information
pulsejet committed Feb 9, 2025
1 parent 4760dda commit cc0d342
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions std/object/store_memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (n *memoryStoreNode) find(name enc.Name) *memoryStoreNode {
return nil
}

key := name[0].String()
key := name[0].TlvStr()
if child := n.children[key]; child != nil {
return child.find(name[1:])
} else {
Expand Down Expand Up @@ -138,7 +138,7 @@ func (n *memoryStoreNode) insert(name enc.Name, version uint64, wire []byte) {
n.children = make(map[string]*memoryStoreNode)
}

key := name[0].String()
key := name[0].TlvStr()
if child := n.children[key]; child != nil {
child.insert(name[1:], version, wire)
} else {
Expand All @@ -163,7 +163,7 @@ func (n *memoryStoreNode) remove(name enc.Name, prefix bool) bool {
return false
}

key := name[0].String()
key := name[0].TlvStr()
if child := n.children[key]; child != nil {
prune := child.remove(name[1:], prefix)
if prune {
Expand Down

0 comments on commit cc0d342

Please sign in to comment.