Skip to content

Commit

Permalink
chore: unnecessary assignment to the blank identifier (S1005)
Browse files Browse the repository at this point in the history
Signed-off-by: guoguangwu <[email protected]>
  • Loading branch information
testwill authored and dghubble committed Jul 29, 2023
1 parent 2f591dd commit 2bc358f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion path_trie.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (trie *PathTrie) Get(key string) interface{} {
func (trie *PathTrie) Put(key string, value interface{}) bool {
node := trie
for part, i := trie.segmenter(key, 0); part != ""; part, i = trie.segmenter(key, i) {
child, _ := node.children[part]
child := node.children[part]
if child == nil {
if node.children == nil {
node.children = map[string]*PathTrie{}
Expand Down
2 changes: 1 addition & 1 deletion rune_trie.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (trie *RuneTrie) Get(key string) interface{} {
func (trie *RuneTrie) Put(key string, value interface{}) bool {
node := trie
for _, r := range key {
child, _ := node.children[r]
child := node.children[r]
if child == nil {
if node.children == nil {
node.children = map[rune]*RuneTrie{}
Expand Down

0 comments on commit 2bc358f

Please sign in to comment.