diff --git a/boot_diags/src/components/progress.rs b/boot_diags/src/components/progress.rs index 3ab25ea..7c1bcf8 100644 --- a/boot_diags/src/components/progress.rs +++ b/boot_diags/src/components/progress.rs @@ -86,8 +86,23 @@ impl Component for Progress { &result, &text ); if let Some(line) = self.lines.last_mut() { - line.result = result; - line.text = text; + let old_result = line.result.clone(); + match (old_result, result.clone()) { + (DiagResult::Pass, _) => { + line.result = result; + line.text = text; + } + (DiagResult::Warn, DiagResult::Pass | DiagResult::Warn) => { + line.text = String::from("Unknown"); + } + (DiagResult::Warn, DiagResult::Fail) => { + line.result = DiagResult::Fail; + line.text = String::from("Unknown"); + } + (DiagResult::Fail, _) => { + line.text = String::from("Unknown"); + } + }; } } Action::DiagLineEnd { text } => {