]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/passes/calculate_doc_coverage.rs
Use local and remapped paths where appropriate
[rust.git] / src / librustdoc / passes / calculate_doc_coverage.rs
index 6c3881811b3d5a0c00f1b4922c5c6a8effa23cc2..c115f741afc52694b675cfddea84fde360aa7cdb 100644 (file)
@@ -119,7 +119,7 @@ fn to_json(&self) -> String {
             &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 @@ fn print_table_record(
         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.),