diff options
Diffstat (limited to 'cli/lsp/testing/lsp_custom.rs')
-rw-r--r-- | cli/lsp/testing/lsp_custom.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cli/lsp/testing/lsp_custom.rs b/cli/lsp/testing/lsp_custom.rs index 8182371ca..59df9884d 100644 --- a/cli/lsp/testing/lsp_custom.rs +++ b/cli/lsp/testing/lsp_custom.rs @@ -21,8 +21,9 @@ pub struct TestData { pub id: String, /// The human readable test to display for the test. pub label: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub steps: Option<Vec<TestData>>, + #[serde(skip_serializing_if = "Vec::is_empty")] + #[serde(default)] + pub steps: Vec<TestData>, /// The range where the test is located. #[serde(skip_serializing_if = "Option::is_none")] pub range: Option<lsp::Range>, @@ -92,8 +93,9 @@ pub enum TestRunKind { pub struct TestRunRequestParams { pub id: u32, pub kind: TestRunKind, - #[serde(skip_serializing_if = "Option::is_none")] - pub exclude: Option<Vec<TestIdentifier>>, + #[serde(skip_serializing_if = "Vec::is_empty")] + #[serde(default)] + pub exclude: Vec<TestIdentifier>, #[serde(skip_serializing_if = "Option::is_none")] pub include: Option<Vec<TestIdentifier>>, } |