mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 19:58:32 +00:00
Remove implementors setting
This commit is contained in:
parent
fba4149bf1
commit
92dae39b64
@ -453,7 +453,6 @@ fn settings(root_path: &str, suffix: &str, themes: &[StylePath]) -> Result<Strin
|
|||||||
("auto-hide-method-docs", "Auto-hide item methods' documentation", false).into(),
|
("auto-hide-method-docs", "Auto-hide item methods' documentation", false).into(),
|
||||||
("auto-hide-trait-implementations", "Auto-hide trait implementation documentation", false)
|
("auto-hide-trait-implementations", "Auto-hide trait implementation documentation", false)
|
||||||
.into(),
|
.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)
|
("go-to-only-result", "Directly go to item in search if there is only one result", false)
|
||||||
.into(),
|
.into(),
|
||||||
("line-numbers", "Show line numbers on code examples", false).into(),
|
("line-numbers", "Show line numbers on code examples", false).into(),
|
||||||
|
@ -789,7 +789,6 @@ function hideThemeButtonState() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var hideMethodDocs = getSettingValue("auto-hide-method-docs") === "true";
|
var hideMethodDocs = getSettingValue("auto-hide-method-docs") === "true";
|
||||||
var hideImplementors = getSettingValue("auto-collapse-implementors") !== "false";
|
|
||||||
var hideImplementations = getSettingValue("auto-hide-trait-implementations") === "true";
|
var hideImplementations = getSettingValue("auto-hide-trait-implementations") === "true";
|
||||||
var hideLargeItemContents = getSettingValue("auto-hide-large-items") !== "false";
|
var hideLargeItemContents = getSettingValue("auto-hide-large-items") !== "false";
|
||||||
|
|
||||||
@ -807,10 +806,6 @@ function hideThemeButtonState() {
|
|||||||
setImplementorsTogglesOpen("blanket-implementations-list", false);
|
setImplementorsTogglesOpen("blanket-implementations-list", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hideImplementors) {
|
|
||||||
setImplementorsTogglesOpen("implementors-list", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
onEachLazy(document.getElementsByClassName("rustdoc-toggle"), function (e) {
|
onEachLazy(document.getElementsByClassName("rustdoc-toggle"), function (e) {
|
||||||
if (!hideLargeItemContents && hasClass(e, "type-contents-toggle")) {
|
if (!hideLargeItemContents && hasClass(e, "type-contents-toggle")) {
|
||||||
e.open = true;
|
e.open = true;
|
||||||
|
@ -1,13 +1,4 @@
|
|||||||
// This test ensures two things:
|
// This test ensures that the implementors toggle are not open by default.
|
||||||
//
|
|
||||||
// 1. The implementors toggle are not open by default.
|
|
||||||
// 2. The "auto-collapse-implementors" setting is working as expected.
|
|
||||||
goto: file://|DOC_PATH|/implementors/trait.Whatever.html
|
goto: file://|DOC_PATH|/implementors/trait.Whatever.html
|
||||||
|
|
||||||
// First, checking that they are not open by default.
|
|
||||||
assert-attribute-false: ("#implementors-list > details", {"open": ""}, ALL)
|
assert-attribute-false: ("#implementors-list > details", {"open": ""}, ALL)
|
||||||
|
|
||||||
// Second, checking "auto-collapse-implementors" setting.
|
|
||||||
local-storage: {"rustdoc-auto-collapse-implementors": false}
|
|
||||||
reload:
|
|
||||||
assert-attribute: ("#implementors-list > details", {"open": ""}, ALL)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user