From fd3146b5bc868e9dbf1000c3b9899d6e45471fd5 Mon Sep 17 00:00:00 2001 From: Zack Mitkin Date: Mon, 20 Mar 2023 16:42:28 -0400 Subject: [PATCH] add serde default to SuiteResult and ReducedResultInfo Statistics fields --- boa_tester/src/main.rs | 5 ++--- boa_tester/src/results.rs | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/boa_tester/src/main.rs b/boa_tester/src/main.rs index a020644f4e7..8a600a8f852 100644 --- a/boa_tester/src/main.rs +++ b/boa_tester/src/main.rs @@ -361,11 +361,10 @@ impl Add for Statistics { struct SuiteResult { #[serde(rename = "n")] name: Box, - #[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")] diff --git a/boa_tester/src/results.rs b/boa_tester/src/results.rs index 13875904496..8bff68136e4 100644 --- a/boa_tester/src/results.rs +++ b/boa_tester/src/results.rs @@ -27,11 +27,10 @@ struct ReducedResultInfo { commit: Box, #[serde(rename = "u")] test262_commit: Box, - #[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, }