Skip to content

Commit

Permalink
Show line even if there is no code examples
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Aug 21, 2020
1 parent b20b6f8 commit adeedf5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/librustdoc/passes/calculate_doc_coverage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fn calculate_doc_coverage(krate: clean::Crate, ctx: &DocContext<'_>) -> clean::C
krate
}

#[derive(Default, Copy, Clone, Serialize)]
#[derive(Default, Copy, Clone, Serialize, Debug)]
struct ItemCount {
total: u64,
with_docs: u64,
Expand Down Expand Up @@ -155,14 +155,12 @@ impl CoverageCalculator {
print_table_line();

for (file, &count) in &self.items {
if let (Some(percentage), Some(examples_percentage)) =
(count.percentage(), count.examples_percentage())
{
if let Some(percentage) = count.percentage() {
print_table_record(
&limit_filename_len(file.to_string()),
count,
percentage,
examples_percentage,
count.examples_percentage().unwrap_or(0.),
);

total += count;
Expand Down

0 comments on commit adeedf5

Please sign in to comment.