Skip to content

Commit

Permalink
fix(bench): Handle ignored error in benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
romshark committed Jan 16, 2022
1 parent a472bde commit e461d2e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,9 @@ func CalcStatsValyalaFastjson(str []byte) (s Stats) {
}
lv := level + 1
for i, v := range values {
parseValue(v, lv, key, i)
if err := parseValue(v, lv, key, i); err != nil {
return err
}
if i := i + 1; i > s.MaxArrayLen {
s.MaxArrayLen = i
}
Expand Down Expand Up @@ -532,7 +534,9 @@ func CalcStatsValyalaFastjsonWithPath(str []byte) (s Stats) {
}
lv := level + 1
for i, v := range values {
parseValue(v, lv, key, path, i)
if err := parseValue(v, lv, key, path, i); err != nil {
return err
}
if i := i + 1; i > s.MaxArrayLen {
s.MaxArrayLen = i
}
Expand Down

0 comments on commit e461d2e

Please sign in to comment.