Skip to content

Commit 7d337c7

Browse files
authored
Merge pull request #18897 from duncanawoods/master
fix: Make test_runner::TestState::stdout optional to fix parsing cargo test json output
2 parents 759a9e6 + 04c06b4 commit 7d337c7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/rust-analyzer/src/test_runner.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ pub(crate) enum TestState {
1818
Started,
1919
Ok,
2020
Ignored,
21-
Failed { stdout: String },
21+
Failed {
22+
// the stdout field is not always present depending on cargo test flags
23+
#[serde(skip_serializing_if = "String::is_empty", default)]
24+
stdout: String,
25+
},
2226
}
2327

2428
#[derive(Debug, Deserialize)]

0 commit comments

Comments
 (0)