Skip to content

Commit 88ae089

Browse files
authoredJan 15, 2025
Merge pull request rust-lang#18897 from duncanawoods/master
fix: Make test_runner::TestState::stdout optional to fix parsing cargo test json output
2 parents 805598d + c26f175 commit 88ae089

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎src/tools/rust-analyzer/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)
Please sign in to comment.