Skip to content

Commit

Permalink
Add collapser for associated const
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Aug 25, 2018
1 parent b0ee5de commit a00706a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1990,7 +1990,8 @@
if (!next) {
return;
}
if ((checkIfThereAreMethods(next.childNodes) || hasClass(e, 'method')) &&
if ((hasClass(e, 'method') || hasClass(e, 'associatedconstant') ||
checkIfThereAreMethods(next.childNodes)) &&
(hasClass(next, 'docblock') ||
hasClass(e, 'impl') ||
(hasClass(next, 'stability') &&
Expand All @@ -1999,10 +2000,8 @@
}
};
onEach(document.getElementsByClassName('method'), func);
onEach(document.getElementsByClassName('associatedconstant'), func);
onEach(document.getElementsByClassName('impl'), func);
onEach(document.getElementsByClassName('impl-items'), function(e) {
onEach(e.getElementsByClassName('associatedconstant'), func);
});

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

0 comments on commit a00706a

Please sign in to comment.