Skip to content

Commit

Permalink
refactor(exp/maps): remove redundant condition
Browse files Browse the repository at this point in the history
  • Loading branch information
searKing committed Oct 16, 2024
1 parent 9656aa3 commit 568bc33
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions go/exp/maps/nested.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,8 @@ func (m NestedMap[K]) LoadOrStore(keys []K, value any) (actual any, loaded bool)
if ok {
return m2, true
}
if !ok {
nm[k] = value
return value, false
}
nm[k] = value
return value, false
}
if !ok {
// intermediate key does not exist
Expand Down

0 comments on commit 568bc33

Please sign in to comment.