Skip to content

Commit aebbcfd

Browse files
zimbatmBrian McGee
authored and
Brian McGee
committed
nit: clean batch capacity (#17)
Since we discussed this in https://git.numtide.com/numtide/treefmt/pulls/14#issuecomment-609 It doesn't really matter. Reviewed-on: https://git.numtide.com/numtide/treefmt/pulls/17 Co-authored-by: zimbatm <[email protected]> Co-committed-by: zimbatm <[email protected]>
1 parent 4a78a1e commit aebbcfd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

internal/cli/format.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ func (f *Format) Run() error {
110110
// update cache as paths are completed
111111
eg.Go(func() error {
112112
batchSize := 1024
113-
batch := make([]string, batchSize)
114-
batch = batch[:0]
113+
batch := make([]string, 0, batchSize)
115114

116115
var pending, completed, changes int
117116

0 commit comments

Comments
 (0)