Skip to content

Commit

Permalink
add serde default to SuiteResult and ReducedResultInfo Statistics fields
Browse files Browse the repository at this point in the history
  • Loading branch information
ZackMitkin committed Mar 20, 2023
1 parent 6f0ac5c commit fd3146b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions boa_tester/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,10 @@ impl Add for Statistics {
struct SuiteResult {
#[serde(rename = "n")]
name: Box<str>,
#[serde(rename = "a")]
all_stats: Statistics,
#[serde(rename = "a5")]
#[serde(rename = "a5", default)]
es5_stats: Statistics,
#[serde(rename = "a6")]
#[serde(rename = "a6", default)]
es6_stats: Statistics,
#[serde(skip_serializing_if = "Vec::is_empty", default)]
#[serde(rename = "s")]
Expand Down
5 changes: 2 additions & 3 deletions boa_tester/src/results.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@ struct ReducedResultInfo {
commit: Box<str>,
#[serde(rename = "u")]
test262_commit: Box<str>,
#[serde(rename = "a")]
all_stats: Statistics,
#[serde(rename = "a5")]
#[serde(rename = "a5", default)]
es5_stats: Statistics,
#[serde(rename = "a6")]
#[serde(rename = "a6", default)]
es6_stats: Statistics,
}

Expand Down

0 comments on commit fd3146b

Please sign in to comment.