diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-08-30 16:11:10 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-08-30 16:21:23 +0200 |
| commit | eb913664333036b185bd5d5f3df3ce270864aaa6 (patch) | |
| tree | d2844e910ac5c1524e4ec30c679573655c58d95f /src/librustdoc/html | |
| parent | 8553c199e7c7764dce12eff38ee4235a0fe455d6 (diff) | |
| download | rust-eb913664333036b185bd5d5f3df3ce270864aaa6.tar.gz rust-eb913664333036b185bd5d5f3df3ce270864aaa6.zip | |
Put back "auto-collapse-implementors" setting
Diffstat (limited to 'src/librustdoc/html')
| -rw-r--r-- | src/librustdoc/html/render/mod.rs | 1 | ||||
| -rw-r--r-- | src/librustdoc/html/static/js/main.js | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index 0b060468d05..70f1e6e024d 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -453,6 +453,7 @@ fn settings(root_path: &str, suffix: &str, themes: &[StylePath]) -> Result<Strin ("auto-hide-method-docs", "Auto-hide item methods' documentation", false).into(), ("auto-hide-trait-implementations", "Auto-hide trait implementation documentation", false) .into(), + ("auto-collapse-implementors", "Auto-hide implementors of a trait", true).into(), ("go-to-only-result", "Directly go to item in search if there is only one result", false) .into(), ("line-numbers", "Show line numbers on code examples", false).into(), diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js index 1eebd392564..0a6fca7da20 100644 --- a/src/librustdoc/html/static/js/main.js +++ b/src/librustdoc/html/static/js/main.js @@ -789,6 +789,7 @@ function hideThemeButtonState() { } var hideMethodDocs = getSettingValue("auto-hide-method-docs") === "true"; + var hideImplementors = getSettingValue("auto-collapse-implementors") !== "false"; var hideImplementations = getSettingValue("auto-hide-trait-implementations") === "true"; var hideLargeItemContents = getSettingValue("auto-hide-large-items") !== "false"; @@ -806,6 +807,10 @@ function hideThemeButtonState() { setImplementorsTogglesOpen("blanket-implementations-list", false); } + if (!hideImplementors) { + setImplementorsTogglesOpen("implementors-list", true); + } + onEachLazy(document.getElementsByClassName("rustdoc-toggle"), function (e) { if (!hideLargeItemContents && hasClass(e, "type-contents-toggle")) { e.open = true; |
