Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/rust-analyzer/src/test_runner.rs')
-rw-r--r--crates/rust-analyzer/src/test_runner.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/test_runner.rs b/crates/rust-analyzer/src/test_runner.rs
index 503b3ee43a..3edfb812cf 100644
--- a/crates/rust-analyzer/src/test_runner.rs
+++ b/crates/rust-analyzer/src/test_runner.rs
@@ -18,7 +18,11 @@ pub(crate) enum TestState {
Started,
Ok,
Ignored,
- Failed { stdout: String },
+ Failed {
+ // the stdout field is not always present depending on cargo test flags
+ #[serde(skip_serializing_if = "String::is_empty", default)]
+ stdout: String,
+ },
}
#[derive(Debug, Deserialize)]