The candidates render, over the gathered data — the repository path and the routed path (ListTriageCandidates' bundle) share it.
(
feature: &str,
into: &str,
set: &atomic_repository::CandidateSet,
json: bool,
)
| 135 | /// The candidates render, over the gathered data — the repository path and |
| 136 | /// the routed path (ListTriageCandidates' bundle) share it. |
| 137 | fn render_candidate_set( |
| 138 | feature: &str, |
| 139 | into: &str, |
| 140 | set: &atomic_repository::CandidateSet, |
| 141 | json: bool, |
| 142 | ) -> CliResult<()> { |
| 143 | if json { |
| 144 | println!("{}", serde_json::to_string_pretty(&set).unwrap()); |
| 145 | return Ok(()); |
| 146 | } |
| 147 | |
| 148 | println!("Triage candidates: {} \u{2192} {}", set.feature, set.target); |
| 149 | println!(" only in {}: {}", set.feature, set.only_in_feature.len()); |
| 150 | for hash in &set.only_in_feature { |
| 151 | println!(" {}", hash); |
| 152 | } |
| 153 | println!(" closure additions: {}", set.closure_additions.len()); |
| 154 | for hash in &set.closure_additions { |
| 155 | println!(" {}", hash); |
| 156 | } |
| 157 | println!(" baggage: {}", set.baggage.len()); |
| 158 | for entry in &set.baggage { |
| 159 | let coverage = match entry.coverage { |
| 160 | atomic_repository::Coverage::Covered => "covered", |
| 161 | atomic_repository::Coverage::Uncovered => "uncovered", |
| 162 | atomic_repository::Coverage::Unknown => "unknown", |
| 163 | }; |
| 164 | let files = if entry.modifies.is_empty() { |
| 165 | String::new() |
| 166 | } else { |
| 167 | format!(" [{}]", entry.modifies.join(", ")) |
| 168 | }; |
| 169 | println!(" {} ({}){}", entry.change, coverage, files); |
| 170 | } |
| 171 | |
| 172 | Ok(()) |
| 173 | } |
| 174 | |
| 175 | /// Write the rendered HTML to a file and (unless suppressed) open it in the |
| 176 | /// default browser via a `file://` URL. |