Skip to content

Commit 4346231

Browse files
committed
Delete buggy code that is probably dead
i_e is not defined, so in some cases this block cannot work. Furthermore, the toggle-wrapper is added after this block runs, so the hasClass(toggle-wrapper) check never seems to run. This appears to be dead code.
1 parent 0016e05 commit 4346231

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

src/librustdoc/html/static/main.js

-19
Original file line numberDiff line numberDiff line change
@@ -2180,25 +2180,6 @@ if (!DOMTokenList.prototype.remove) {
21802180

21812181
let showItemDeclarations = getCurrentValue("rustdoc-item-declarations") === "false";
21822182
function buildToggleWrapper(e) {
2183-
if (hasClass(e, "autohide")) {
2184-
let wrap = e.previousElementSibling;
2185-
if (wrap && hasClass(wrap, "toggle-wrapper")) {
2186-
let inner_toggle = wrap.childNodes[0];
2187-
let extra = e.childNodes[0].tagName === "H3";
2188-
2189-
e.style.display = "none";
2190-
addClass(wrap, "collapsed");
2191-
onEachLazy(inner_toggle.getElementsByClassName("inner"), function(e) {
2192-
e.innerHTML = labelForToggleButton(true);
2193-
});
2194-
onEachLazy(inner_toggle.getElementsByClassName("toggle-label"), function(e) {
2195-
e.style.display = "inline-block";
2196-
if (extra === true) {
2197-
i_e.innerHTML = " Show " + e.childNodes[0].innerHTML;
2198-
}
2199-
});
2200-
}
2201-
}
22022183
if (e.parentNode.id === "main") {
22032184
let otherMessage = "";
22042185
let fontSize;

0 commit comments

Comments
 (0)