Skip to content

Commit

Permalink
Use zio.Copy instead of manual loop
Browse files Browse the repository at this point in the history
Co-authored-by: Noah Treuhaft <[email protected]>
  • Loading branch information
jamii and nwt authored Nov 4, 2023
1 parent cdce672 commit 9befc52
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions vng/vng_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,8 @@ func roundtrip(t *testing.T, valuesIn []zed.Value, writerOpts vngio.WriterOpts)
var buf bytes.Buffer
writer, err := vngio.NewWriterWithOpts(zio.NopCloser(&buf), writerOpts)
require.NoError(t, err)
for i := range valuesIn {
err := writer.Write(&valuesIn[i])
require.NoError(t, err)
}
err = writer.Close()
require.NoError(t, err)
require.NoError(t, zio.Copy(writer, zbuf.NewArray(valuesIn))

Check failure on line 86 in vng/vng_test.go

View workflow job for this annotation

GitHub Actions / test

missing ',' before newline in argument list

Check failure on line 86 in vng/vng_test.go

View workflow job for this annotation

GitHub Actions / test-windows

missing ',' before newline in argument list
require.NoError(t, writer.Close())

Check failure on line 87 in vng/vng_test.go

View workflow job for this annotation

GitHub Actions / test

missing ',' before newline in argument list

// Read
reader, err := vngio.NewReader(zed.NewContext(), bytes.NewReader(buf.Bytes()))

Check failure on line 90 in vng/vng_test.go

View workflow job for this annotation

GitHub Actions / test

missing ',' in argument list
Expand Down

0 comments on commit 9befc52

Please sign in to comment.