Add setting to prevent doc auto-hide of trait implementations
This commit is contained in:
parent
0c0315cfd9
commit
c0ec5d5e44
2 changed files with 14 additions and 10 deletions
|
@ -1669,6 +1669,8 @@ impl<'a> Settings<'a> {
|
||||||
settings: vec![
|
settings: vec![
|
||||||
("item-declarations", "Auto-hide item declarations.", true),
|
("item-declarations", "Auto-hide item declarations.", true),
|
||||||
("item-attributes", "Auto-hide item attributes.", 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",
|
("go-to-only-result", "Directly go to item in search if there is only one result",
|
||||||
false),
|
false),
|
||||||
],
|
],
|
||||||
|
|
|
@ -1938,6 +1938,7 @@
|
||||||
if (collapse) {
|
if (collapse) {
|
||||||
toggleAllDocs(pageId, true);
|
toggleAllDocs(pageId, true);
|
||||||
}
|
}
|
||||||
|
if (getCurrentValue('rustdoc-trait-implementations') !== "false") {
|
||||||
onEach(document.getElementsByClassName("collapse-toggle"), function(e) {
|
onEach(document.getElementsByClassName("collapse-toggle"), function(e) {
|
||||||
// inherent impl ids are like 'impl' or impl-<number>'.
|
// inherent impl ids are like 'impl' or impl-<number>'.
|
||||||
// they will never be hidden by default.
|
// they will never be hidden by default.
|
||||||
|
@ -1950,6 +1951,7 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var x = document.getElementById('toggle-all-docs');
|
var x = document.getElementById('toggle-all-docs');
|
||||||
if (x) {
|
if (x) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue