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 3, 2023
1 parent 5160fef commit de4ba84
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions vng/vng_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,14 @@ func FuzzVngRoundtripBytes(f *testing.F) {
context := zed.NewContext()
reader := zngio.NewReader(context, bytesReader)
defer reader.Close()
values := make([]zed.Value, 0)
for {
value, err := reader.Read()
if err != nil {
return
}
if value == nil {
break
}
values = append(values, *(value.Copy()))
var a zbuf.Array

Check failure on line 61 in vng/vng_test.go

View workflow job for this annotation

GitHub Actions / test-windows

undefined: zbuf
if zio.Copy(&a, reader) != nil {

Check failure on line 62 in vng/vng_test.go

View workflow job for this annotation

GitHub Actions / test-windows

undefined: zio
return
}
writerOpts := vngio.WriterOpts{
roundtrip(t, a.Values(), vngio.WriterOpts{
ColumnThresh: units.Bytes(vngio.DefaultColumnThresh),
SkewThresh: units.Bytes(vngio.DefaultSkewThresh),
}
roundtrip(t, values, writerOpts)
})
})
}

Expand Down

0 comments on commit de4ba84

Please sign in to comment.