1
Fork 0

Add setting to prevent doc auto-hide of trait implementations

This commit is contained in:
Guillaume Gomez 2018-07-08 15:07:06 +02:00
parent 0c0315cfd9
commit c0ec5d5e44
2 changed files with 14 additions and 10 deletions

View file

@ -1669,6 +1669,8 @@ impl<'a> Settings<'a> {
settings: vec![
("item-declarations", "Auto-hide item declarations.", true),
("item-attributes", "Auto-hide item attributes.", true),
("trait-implementations", "Auto-hide trait implementations documentation",
true),
("go-to-only-result", "Directly go to item in search if there is only one result",
false),
],

View file

@ -1938,6 +1938,7 @@
if (collapse) {
toggleAllDocs(pageId, true);
}
if (getCurrentValue('rustdoc-trait-implementations') !== "false") {
onEach(document.getElementsByClassName("collapse-toggle"), function(e) {
// inherent impl ids are like 'impl' or impl-<number>'.
// they will never be hidden by default.
@ -1950,6 +1951,7 @@
}
});
}
}
var x = document.getElementById('toggle-all-docs');
if (x) {