Skip to content

Commit

Permalink
Don't generate impl-items div container if there is none
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jun 1, 2021
1 parent 93389b5 commit 98a9b02
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/librustdoc/html/render/mod.rs
Expand Up @@ -1667,10 +1667,12 @@ fn render_impl(
);
}
}
w.write_str("<div class=\"impl-items\">");
w.push_buffer(default_impl_items);
w.push_buffer(impl_items);
close_tags.insert_str(0, "</div>");
if !default_impl_items.is_empty() || !impl_items.is_empty() {
w.write_str("<div class=\"impl-items\">");
w.push_buffer(default_impl_items);
w.push_buffer(impl_items);
close_tags.insert_str(0, "</div>");
}
w.write_str(&close_tags);
}

Expand Down

0 comments on commit 98a9b02

Please sign in to comment.