Skip to content

Commit

Permalink
Remove implementors setting
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Sep 1, 2021
1 parent fba4149 commit 92dae39
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
1 change: 0 additions & 1 deletion src/librustdoc/html/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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-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(),
Expand Down
5 changes: 0 additions & 5 deletions src/librustdoc/html/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,6 @@ 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";

Expand All @@ -807,10 +806,6 @@ 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;
Expand Down
11 changes: 1 addition & 10 deletions src/test/rustdoc-gui/toggle-implementors.goml
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
// This test ensures two things:
//
// 1. The implementors toggle are not open by default.
// 2. The "auto-collapse-implementors" setting is working as expected.
// This test ensures that the implementors toggle are not open by default.
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)

// Second, checking "auto-collapse-implementors" setting.
local-storage: {"rustdoc-auto-collapse-implementors": false}
reload:
assert-attribute: ("#implementors-list > details", {"open": ""}, ALL)

0 comments on commit 92dae39

Please sign in to comment.