Skip to content

Commit

Permalink
nit: clean batch capacity (#17)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
zimbatm authored and Brian McGee committed Jan 3, 2024
1 parent 4a78a1e commit aebbcfd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/cli/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ func (f *Format) Run() error {
// update cache as paths are completed
eg.Go(func() error {
batchSize := 1024
batch := make([]string, batchSize)
batch = batch[:0]
batch := make([]string, 0, batchSize)

var pending, completed, changes int

Expand Down

0 comments on commit aebbcfd

Please sign in to comment.