Skip to content

Commit 99df340

Browse files
Hide associated constants too when collapsing implementation
1 parent c7cff21 commit 99df340

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/librustdoc/html/static/main.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -2257,9 +2257,12 @@ function defocusSearchBar() {
22572257

22582258
function implHider(addOrRemove, fullHide) {
22592259
return function(n) {
2260-
var is_method = hasClass(n, "method") || fullHide;
2261-
if (is_method || hasClass(n, "type")) {
2262-
if (is_method === true) {
2260+
var shouldHide =
2261+
fullHide === true ||
2262+
hasClass(n, "method") === true ||
2263+
hasClass(n, "associatedconstant") === true;
2264+
if (shouldHide === true || hasClass(n, "type") === true) {
2265+
if (shouldHide === true) {
22632266
if (addOrRemove) {
22642267
addClass(n, "hidden-by-impl-hider");
22652268
} else {

0 commit comments

Comments
 (0)