Skip to main content

compact

Function compact 

Source
pub fn compact(p: &Preflight, unicode: bool) -> String
Expand description

The short form an entry prints: who and where, one line of the claims that matter most, and the most urgent thing to look at.

use majordomus_cli::environment::preflight::{compact, derive, Observations};
let text = compact(&derive(&Observations::empty("demo", 0)), true);
assert!(text.starts_with("◆ demo"));
assert!(text.contains("server ?"), "{text}");
assert!(!text.contains('✓'), "nothing observed, nothing marked proven: {text}");