File tree 2 files changed +14
-10
lines changed
2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -1669,6 +1669,8 @@ impl<'a> Settings<'a> {
1669
1669
settings : vec ! [
1670
1670
( "item-declarations" , "Auto-hide item declarations." , true ) ,
1671
1671
( "item-attributes" , "Auto-hide item attributes." , true ) ,
1672
+ ( "trait-implementations" , "Auto-hide trait implementations documentation" ,
1673
+ true ) ,
1672
1674
( "go-to-only-result" , "Directly go to item in search if there is only one result" ,
1673
1675
false ) ,
1674
1676
] ,
Original file line number Diff line number Diff line change 1938
1938
if ( collapse ) {
1939
1939
toggleAllDocs ( pageId , true ) ;
1940
1940
}
1941
- onEach ( document . getElementsByClassName ( "collapse-toggle" ) , function ( e ) {
1942
- // inherent impl ids are like 'impl' or impl-<number>'.
1943
- // they will never be hidden by default.
1944
- var n = e . parentNode ;
1945
- if ( n . id . match ( / ^ i m p l (?: - \d + ) ? $ / ) === null ) {
1946
- // Automatically minimize all non-inherent impls
1947
- if ( collapse || hasClass ( n , 'impl' ) ) {
1948
- collapseDocs ( e , "hide" , pageId ) ;
1941
+ if ( getCurrentValue ( 'rustdoc-trait-implementations' ) !== "false" ) {
1942
+ onEach ( document . getElementsByClassName ( "collapse-toggle" ) , function ( e ) {
1943
+ // inherent impl ids are like 'impl' or impl-<number>'.
1944
+ // they will never be hidden by default.
1945
+ var n = e . parentNode ;
1946
+ if ( n . id . match ( / ^ i m p l (?: - \d + ) ? $ / ) === null ) {
1947
+ // Automatically minimize all non-inherent impls
1948
+ if ( collapse || hasClass ( n , 'impl' ) ) {
1949
+ collapseDocs ( e , "hide" , pageId ) ;
1950
+ }
1949
1951
}
1950
- }
1951
- } ) ;
1952
+ } ) ;
1953
+ }
1952
1954
}
1953
1955
1954
1956
var x = document . getElementById ( 'toggle-all-docs' ) ;
You can’t perform that action at this time.
0 commit comments