Use local and remapped paths where appropriate

This commit is contained in:
Andy Wang
2021-04-19 23:27:02 +01:00
parent fb4f6439f6
commit 5417b45c26
28 changed files with 85 additions and 74 deletions

View File

@@ -119,7 +119,7 @@ impl<'a, 'b> CoverageCalculator<'a, 'b> {
&self
.items
.iter()
.map(|(k, v)| (k.to_string(), v))
.map(|(k, v)| (k.prefer_local().to_string(), v))
.collect::<BTreeMap<String, &ItemCount>>(),
)
.expect("failed to convert JSON data to string")
@@ -159,7 +159,7 @@ impl<'a, 'b> CoverageCalculator<'a, 'b> {
for (file, &count) in &self.items {
if let Some(percentage) = count.percentage() {
print_table_record(
&limit_filename_len(file.to_string()),
&limit_filename_len(file.prefer_local().to_string_lossy().into()),
count,
percentage,
count.examples_percentage().unwrap_or(0.),