Skip to content

Commit

Permalink
Add capacity to slice creation, when capacity is known (#1103)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaHarindar authored and Ibrahim Jarif committed Nov 11, 2019
1 parent cbbaefa commit 10155ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stream_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (sw *StreamWriter) Write(kvs *pb.KVList) error {
}
req.Entries = append(req.Entries, e)
}
var all []*request
all := make([]*request, 0, len(streamReqs))
for _, req := range streamReqs {
all = append(all, req)
}
Expand Down

0 comments on commit 10155ab

Please sign in to comment.