Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Commit

Permalink
Passing capacity to make() in place of length. (#1276)
Browse files Browse the repository at this point in the history
* Passing capacity to make() in place of length. The second argument is length and not capacity.
  • Loading branch information
fayfaychan committed Mar 31, 2022
1 parent c2a62a2 commit 0521206
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trace/lrumap.go
Expand Up @@ -44,7 +44,7 @@ func (lm lruMap) len() int {
}

func (lm lruMap) keys() []interface{} {
keys := make([]interface{}, len(lm.cacheKeys))
keys := make([]interface{}, 0, len(lm.cacheKeys))
for k := range lm.cacheKeys {
keys = append(keys, k)
}
Expand Down

0 comments on commit 0521206

Please sign in to comment.