File tree 3 files changed +24
-6
lines changed
3 files changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -1545,7 +1545,7 @@ fn render_impl(
1545
1545
let open_details = |close_tags : & mut String | {
1546
1546
if toggled {
1547
1547
close_tags. insert_str ( 0 , "</details>" ) ;
1548
- "<details class=\" rustdoc-toggle implementors-toggle\" open ><summary>"
1548
+ "<details class=\" rustdoc-toggle implementors-toggle\" ><summary>"
1549
1549
} else {
1550
1550
""
1551
1551
}
Original file line number Diff line number Diff line change @@ -776,12 +776,29 @@ function hideThemeButtonState() {
776
776
777
777
var hideMethodDocs = getSettingValue ( "auto-hide-method-docs" ) === "true" ;
778
778
var hideImplementors = getSettingValue ( "auto-collapse-implementors" ) !== "false" ;
779
+ var hideImplementations = getSettingValue ( "auto-hide-trait-implementations" ) !== "false" ;
779
780
var hideLargeItemContents = getSettingValue ( "auto-hide-large-items" ) !== "false" ;
780
781
781
- onEachLazy ( document . getElementsByTagName ( "details" ) , function ( e ) {
782
- var showLargeItem = ! hideLargeItemContents && hasClass ( e , "type-contents-toggle" ) ;
783
- var showImplementor = ! hideImplementors && hasClass ( e , "implementors-toggle" ) ;
784
- if ( showLargeItem || showImplementor ) {
782
+ function openImplementors ( id ) {
783
+ var list = document . getElementById ( id ) ;
784
+ if ( list !== null ) {
785
+ onEachLazy ( list . getElementsByClassName ( "implementors-toggle" ) , function ( e ) {
786
+ e . open = true ;
787
+ } ) ;
788
+ }
789
+ }
790
+
791
+ if ( ! hideImplementations ) {
792
+ openImplementors ( "trait-implementations-list" ) ;
793
+ openImplementors ( "blanket-implementations-list" ) ;
794
+ }
795
+
796
+ if ( ! hideImplementors ) {
797
+ openImplementors ( "implementors-list" ) ;
798
+ }
799
+
800
+ onEachLazy ( document . getElementsByClassName ( "rustdoc-toggle" ) , function ( e ) {
801
+ if ( ! hideLargeItemContents && hasClass ( e , "type-contents-toggle" ) ) {
785
802
e . open = true ;
786
803
}
787
804
if ( hideMethodDocs && hasClass ( e , "method-toggle" ) ) {
Original file line number Diff line number Diff line change @@ -65,7 +65,8 @@ impl T for S2 {
65
65
}
66
66
67
67
// @has manual_impl/struct.S3.html '//*[@class="trait"]' 'T'
68
- // @has - '//details[@open=""]/div[@class="docblock"]' 'Docs associated with the S3 trait implementation.'
68
+ // @has - '//details/div[@class="docblock"]' 'Docs associated with the S3 trait implementation.'
69
+ // @!has - '//details[@open=""]/div[@class="docblock"]' 'Docs associated with the S3 trait implementation.'
69
70
// @has - '//details[@open=""]/div[@class="docblock"]' 'Docs associated with the S3 trait b_method implementation.'
70
71
// @!has - '//div[@class="impl-items"]/details[@open=""]//div[@class="docblock"]' 'Docs associated with the trait a_method definition.'
71
72
// @has - '//div[@class="impl-items"]/details//div[@class="docblock"]' 'Docs associated with the trait a_method definition.'
You can’t perform that action at this time.
0 commit comments