Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2682,6 +2682,13 @@ function hideThemeButtonState() {
inner_toggle.onclick = toggleClicked;
e.insertBefore(inner_toggle, e.firstChild);
impl_call(e.previousSibling, inner_toggle);

// If *all* the items are hidden by default, remove the unnecessary indirection
// by toggling the items to be visible and removing the toggle.
if (e.childElementCount - 1 === hiddenElems.length) {
inner_toggle.click();
e.removeChild(inner_toggle);
}
}
});

Expand Down