Skip to content

Commit a00706a

Browse files
Add collapser for associated const
1 parent b0ee5de commit a00706a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/librustdoc/html/static/main.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1990,7 +1990,8 @@
19901990
if (!next) {
19911991
return;
19921992
}
1993-
if ((checkIfThereAreMethods(next.childNodes) || hasClass(e, 'method')) &&
1993+
if ((hasClass(e, 'method') || hasClass(e, 'associatedconstant') ||
1994+
checkIfThereAreMethods(next.childNodes)) &&
19941995
(hasClass(next, 'docblock') ||
19951996
hasClass(e, 'impl') ||
19961997
(hasClass(next, 'stability') &&
@@ -1999,10 +2000,8 @@
19992000
}
20002001
};
20012002
onEach(document.getElementsByClassName('method'), func);
2003+
onEach(document.getElementsByClassName('associatedconstant'), func);
20022004
onEach(document.getElementsByClassName('impl'), func);
2003-
onEach(document.getElementsByClassName('impl-items'), function(e) {
2004-
onEach(e.getElementsByClassName('associatedconstant'), func);
2005-
});
20062005

20072006
function createToggle(otherMessage, fontSize, extraClass) {
20082007
var span = document.createElement('span');

0 commit comments

Comments
 (0)