Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 98a9b02

Browse files
Don't generate impl-items div container if there is none
1 parent 93389b5 commit 98a9b02

File tree

1 file changed

+6
-4
lines changed
  • src/librustdoc/html/render

1 file changed

+6
-4
lines changed

src/librustdoc/html/render/mod.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1667,10 +1667,12 @@ fn render_impl(
16671667
);
16681668
}
16691669
}
1670-
w.write_str("<div class=\"impl-items\">");
1671-
w.push_buffer(default_impl_items);
1672-
w.push_buffer(impl_items);
1673-
close_tags.insert_str(0, "</div>");
1670+
if !default_impl_items.is_empty() || !impl_items.is_empty() {
1671+
w.write_str("<div class=\"impl-items\">");
1672+
w.push_buffer(default_impl_items);
1673+
w.push_buffer(impl_items);
1674+
close_tags.insert_str(0, "</div>");
1675+
}
16741676
w.write_str(&close_tags);
16751677
}
16761678

0 commit comments

Comments
 (0)