diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-12-07 15:13:12 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-12-09 14:13:56 +0100 |
| commit | 99df3406cf419cb5e45f5ee59c7b04cb294630c5 (patch) | |
| tree | 8113a2675b2ca782b43758f6f9ac4df04c860bd0 /src/librustdoc/html | |
| parent | c7cff213e937c1bb301be807ce04fcf6092b9163 (diff) | |
| download | rust-99df3406cf419cb5e45f5ee59c7b04cb294630c5.tar.gz rust-99df3406cf419cb5e45f5ee59c7b04cb294630c5.zip | |
Hide associated constants too when collapsing implementation
Diffstat (limited to 'src/librustdoc/html')
| -rw-r--r-- | src/librustdoc/html/static/main.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 69984be5eb6..0c55a61bb7d 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -2257,9 +2257,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 { |
