Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wzshiming committed Sep 18, 2020
1 parent 26f1174 commit 9ef7686
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ func convertTo(val reflect.Value) (Reply, error) {
return convertTo(val.Elem())
case reflect.Map:
num := val.Len()
items := make(ReplyMultiBulk, 0, num*val.Len())

items := make(ReplyMultiBulk, 0, num*2)
for _, k := range val.MapKeys() {
item, err := convertTo(k)
if err != nil {
Expand Down

0 comments on commit 9ef7686

Please sign in to comment.