Skip to content

Commit

Permalink
new -> newMap
Browse files Browse the repository at this point in the history
  • Loading branch information
jannotti committed Jun 20, 2023
1 parent 435a9f0 commit 300e6a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ledger/apply/mockBalances_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ func (b *mockCreatableBalances) GetAssetParams(addr basics.Address, aidx basics.
// mapWith returns a new map with the given key and value added to it.
// maps.Clone would keep nil inputs as nil, so we make() then map.Copy().
func mapWith[M ~map[K]V, K comparable, V any](m M, k K, v V) M {
new := make(M, len(m)+1)
maps.Copy(new, m)
new[k] = v
return new
newMap := make(M, len(m)+1)
maps.Copy(newMap, m)
newMap[k] = v
return newMap
}

func (b *mockCreatableBalances) PutAppParams(addr basics.Address, aidx basics.AppIndex, params basics.AppParams) error {
Expand Down

0 comments on commit 300e6a5

Please sign in to comment.