@@ -89,7 +89,7 @@ function defocusSearchBar() {
8989 "derive" ,
9090 "traitalias" ] ;
9191
92- var disableShortcuts = getCurrentValue ( "rustdoc- disable-shortcuts") === "true" ;
92+ var disableShortcuts = getSettingValue ( " disable-shortcuts") === "true" ;
9393 var search_input = getSearchInput ( ) ;
9494 var searchTimeout = null ;
9595 var toggleAllDocsId = "toggle-all-docs" ;
@@ -1580,7 +1580,7 @@ function defocusSearchBar() {
15801580 function showResults ( results ) {
15811581 var search = getSearchElement ( ) ;
15821582 if ( results . others . length === 1
1583- && getCurrentValue ( "rustdoc- go-to-only-result") === "true"
1583+ && getSettingValue ( " go-to-only-result") === "true"
15841584 // By default, the search DOM element is "empty" (meaning it has no children not
15851585 // text content). Once a search has been run, it won't be empty, even if you press
15861586 // ESC or empty the search input (which also "cancels" the search).
@@ -2296,7 +2296,7 @@ function defocusSearchBar() {
22962296 function autoCollapse ( pageId , collapse ) {
22972297 if ( collapse ) {
22982298 toggleAllDocs ( pageId , true ) ;
2299- } else if ( getCurrentValue ( "rustdoc- auto-hide-trait-implementations") !== "false" ) {
2299+ } else if ( getSettingValue ( " auto-hide-trait-implementations") !== "false" ) {
23002300 var impl_list = document . getElementById ( "trait-implementations-list" ) ;
23012301
23022302 if ( impl_list !== null ) {
@@ -2370,8 +2370,8 @@ function defocusSearchBar() {
23702370 }
23712371
23722372 var toggle = createSimpleToggle ( false ) ;
2373- var hideMethodDocs = getCurrentValue ( "rustdoc- auto-hide-method-docs") === "true" ;
2374- var hideImplementors = getCurrentValue ( "rustdoc- auto-collapse-implementors") !== "false" ;
2373+ var hideMethodDocs = getSettingValue ( " auto-hide-method-docs") === "true" ;
2374+ var hideImplementors = getSettingValue ( " auto-collapse-implementors") !== "false" ;
23752375 var pageId = getPageId ( ) ;
23762376
23772377 var func = function ( e ) {
@@ -2487,15 +2487,15 @@ function defocusSearchBar() {
24872487 } ) ;
24882488 }
24892489 }
2490- var showItemDeclarations = getCurrentValue ( "rustdoc- auto-hide-" + className ) ;
2490+ var showItemDeclarations = getSettingValue ( " auto-hide-" + className ) ;
24912491 if ( showItemDeclarations === null ) {
24922492 if ( className === "enum" || className === "macro" ) {
24932493 showItemDeclarations = "false" ;
24942494 } else if ( className === "struct" || className === "union" || className === "trait" ) {
24952495 showItemDeclarations = "true" ;
24962496 } else {
24972497 // In case we found an unknown type, we just use the "parent" value.
2498- showItemDeclarations = getCurrentValue ( "rustdoc- auto-hide-declarations") ;
2498+ showItemDeclarations = getSettingValue ( " auto-hide-declarations") ;
24992499 }
25002500 }
25012501 showItemDeclarations = showItemDeclarations === "false" ;
@@ -2569,7 +2569,7 @@ function defocusSearchBar() {
25692569 onEachLazy ( document . getElementsByClassName ( "sub-variant" ) , buildToggleWrapper ) ;
25702570 var pageId = getPageId ( ) ;
25712571
2572- autoCollapse ( pageId , getCurrentValue ( "rustdoc- collapse") === "true" ) ;
2572+ autoCollapse ( pageId , getSettingValue ( " collapse") === "true" ) ;
25732573
25742574 if ( pageId !== null ) {
25752575 expandSection ( pageId ) ;
@@ -2592,7 +2592,7 @@ function defocusSearchBar() {
25922592 ( function ( ) {
25932593 // To avoid checking on "rustdoc-item-attributes" value on every loop...
25942594 var itemAttributesFunc = function ( ) { } ;
2595- if ( getCurrentValue ( "rustdoc- auto-hide-attributes") !== "false" ) {
2595+ if ( getSettingValue ( " auto-hide-attributes") !== "false" ) {
25962596 itemAttributesFunc = function ( x ) {
25972597 collapseDocs ( x . previousSibling . childNodes [ 0 ] , "toggle" ) ;
25982598 } ;
@@ -2611,7 +2611,7 @@ function defocusSearchBar() {
26112611 ( function ( ) {
26122612 // To avoid checking on "rustdoc-line-numbers" value on every loop...
26132613 var lineNumbersFunc = function ( ) { } ;
2614- if ( getCurrentValue ( "rustdoc- line-numbers") === "true" ) {
2614+ if ( getSettingValue ( " line-numbers") === "true" ) {
26152615 lineNumbersFunc = function ( x ) {
26162616 var count = x . textContent . split ( "\n" ) . length ;
26172617 var elems = [ ] ;
@@ -2768,7 +2768,7 @@ function defocusSearchBar() {
27682768 }
27692769 return 0 ;
27702770 } ) ;
2771- var savedCrate = getCurrentValue ( "rustdoc- saved-filter-crate") ;
2771+ var savedCrate = getSettingValue ( " saved-filter-crate") ;
27722772 for ( var i = 0 ; i < crates_text . length ; ++ i ) {
27732773 var option = document . createElement ( "option" ) ;
27742774 option . value = crates_text [ i ] ;
0 commit comments