Skip to content

Commit

Permalink
Rollup merge of #79796 - GuillaumeGomez:hide-associated-const-when-co…
Browse files Browse the repository at this point in the history
…llapsing, r=jyn514

Hide associated constants too when collapsing implementation

Fixes #71849.

r? `@jyn514`
  • Loading branch information
GuillaumeGomez authored Dec 15, 2020
2 parents 275599d + 99df340 commit bfe49a0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2274,9 +2274,12 @@ function defocusSearchBar() {

function implHider(addOrRemove, fullHide) {
return function(n) {
var is_method = hasClass(n, "method") || fullHide;
if (is_method || hasClass(n, "type")) {
if (is_method === true) {
var shouldHide =
fullHide === true ||
hasClass(n, "method") === true ||
hasClass(n, "associatedconstant") === true;
if (shouldHide === true || hasClass(n, "type") === true) {
if (shouldHide === true) {
if (addOrRemove) {
addClass(n, "hidden-by-impl-hider");
} else {
Expand Down

0 comments on commit bfe49a0

Please sign in to comment.