Skip to content

Commit

Permalink
Derive Default for SpecVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
jedel1043 committed Mar 20, 2023
1 parent d2021ab commit e6e2c8d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions boa_tester/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ struct SuiteResult {
struct TestResult {
#[serde(rename = "n")]
name: Box<str>,
#[serde(rename = "v")]
#[serde(rename = "v", default)]
spec_version: SpecVersion,
#[serde(rename = "s", default)]
strict: bool,
Expand All @@ -406,11 +406,12 @@ enum TestOutcomeResult {
Panic,
}

#[derive(Debug, Serialize, Clone, Copy, Deserialize, PartialEq)]
#[derive(Debug, Serialize, Clone, Copy, Deserialize, PartialEq, Default)]
#[serde(untagged)]
enum SpecVersion {
ES5 = 5,
ES6 = 6,
#[default]
ES13 = 13,
}

Expand Down

0 comments on commit e6e2c8d

Please sign in to comment.