Fix parsing cargo test json output by making stdout and optional field

This commit is contained in:
duncan 2025-01-09 16:01:08 +00:00
parent cc016df54b
commit 04c06b4c5a

View file

@ -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)]