Fix trait item doc setting, add new setting, start hiding elements by default and then showing them up

This commit is contained in:
Guillaume Gomez
2018-08-02 00:19:04 +02:00
parent 75af9df71b
commit 2462cdb71d
2 changed files with 34 additions and 10 deletions

View File

@@ -1674,6 +1674,7 @@ impl<'a> Settings<'a> {
("item-attributes", "Auto-hide item attributes.", true),
("trait-implementations", "Auto-hide trait implementations documentation",
true),
("method-docs", "Auto-hide item methods' documentation", false),
("go-to-only-result", "Directly go to item in search if there is only one result",
false),
],
@@ -2073,7 +2074,7 @@ impl<'a> Item<'a> {
fn wrap_into_docblock<F>(w: &mut fmt::Formatter,
f: F) -> fmt::Result
where F: Fn(&mut fmt::Formatter) -> fmt::Result {
write!(w, "<div class=\"docblock type-decl\">")?;
write!(w, "<div class=\"docblock type-decl hidden-by-usual-hider\">")?;
f(w)?;
write!(w, "</div>")
}