@@ -89,7 +89,7 @@ function defocusSearchBar() {
89
89
"derive" ,
90
90
"traitalias" ] ;
91
91
92
- var disableShortcuts = getCurrentValue ( "rustdoc- disable-shortcuts") === "true" ;
92
+ var disableShortcuts = getSettingValue ( " disable-shortcuts") === "true" ;
93
93
var search_input = getSearchInput ( ) ;
94
94
var searchTimeout = null ;
95
95
var toggleAllDocsId = "toggle-all-docs" ;
@@ -1580,7 +1580,7 @@ function defocusSearchBar() {
1580
1580
function showResults ( results ) {
1581
1581
var search = getSearchElement ( ) ;
1582
1582
if ( results . others . length === 1
1583
- && getCurrentValue ( "rustdoc- go-to-only-result") === "true"
1583
+ && getSettingValue ( " go-to-only-result") === "true"
1584
1584
// By default, the search DOM element is "empty" (meaning it has no children not
1585
1585
// text content). Once a search has been run, it won't be empty, even if you press
1586
1586
// ESC or empty the search input (which also "cancels" the search).
@@ -2296,7 +2296,7 @@ function defocusSearchBar() {
2296
2296
function autoCollapse ( pageId , collapse ) {
2297
2297
if ( collapse ) {
2298
2298
toggleAllDocs ( pageId , true ) ;
2299
- } else if ( getCurrentValue ( "rustdoc- auto-hide-trait-implementations") !== "false" ) {
2299
+ } else if ( getSettingValue ( " auto-hide-trait-implementations") !== "false" ) {
2300
2300
var impl_list = document . getElementById ( "trait-implementations-list" ) ;
2301
2301
2302
2302
if ( impl_list !== null ) {
@@ -2370,8 +2370,8 @@ function defocusSearchBar() {
2370
2370
}
2371
2371
2372
2372
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" ;
2375
2375
var pageId = getPageId ( ) ;
2376
2376
2377
2377
var func = function ( e ) {
@@ -2487,15 +2487,15 @@ function defocusSearchBar() {
2487
2487
} ) ;
2488
2488
}
2489
2489
}
2490
- var showItemDeclarations = getCurrentValue ( "rustdoc- auto-hide-" + className ) ;
2490
+ var showItemDeclarations = getSettingValue ( " auto-hide-" + className ) ;
2491
2491
if ( showItemDeclarations === null ) {
2492
2492
if ( className === "enum" || className === "macro" ) {
2493
2493
showItemDeclarations = "false" ;
2494
2494
} else if ( className === "struct" || className === "union" || className === "trait" ) {
2495
2495
showItemDeclarations = "true" ;
2496
2496
} else {
2497
2497
// 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") ;
2499
2499
}
2500
2500
}
2501
2501
showItemDeclarations = showItemDeclarations === "false" ;
@@ -2569,7 +2569,7 @@ function defocusSearchBar() {
2569
2569
onEachLazy ( document . getElementsByClassName ( "sub-variant" ) , buildToggleWrapper ) ;
2570
2570
var pageId = getPageId ( ) ;
2571
2571
2572
- autoCollapse ( pageId , getCurrentValue ( "rustdoc- collapse") === "true" ) ;
2572
+ autoCollapse ( pageId , getSettingValue ( " collapse") === "true" ) ;
2573
2573
2574
2574
if ( pageId !== null ) {
2575
2575
expandSection ( pageId ) ;
@@ -2592,7 +2592,7 @@ function defocusSearchBar() {
2592
2592
( function ( ) {
2593
2593
// To avoid checking on "rustdoc-item-attributes" value on every loop...
2594
2594
var itemAttributesFunc = function ( ) { } ;
2595
- if ( getCurrentValue ( "rustdoc- auto-hide-attributes") !== "false" ) {
2595
+ if ( getSettingValue ( " auto-hide-attributes") !== "false" ) {
2596
2596
itemAttributesFunc = function ( x ) {
2597
2597
collapseDocs ( x . previousSibling . childNodes [ 0 ] , "toggle" ) ;
2598
2598
} ;
@@ -2611,7 +2611,7 @@ function defocusSearchBar() {
2611
2611
( function ( ) {
2612
2612
// To avoid checking on "rustdoc-line-numbers" value on every loop...
2613
2613
var lineNumbersFunc = function ( ) { } ;
2614
- if ( getCurrentValue ( "rustdoc- line-numbers") === "true" ) {
2614
+ if ( getSettingValue ( " line-numbers") === "true" ) {
2615
2615
lineNumbersFunc = function ( x ) {
2616
2616
var count = x . textContent . split ( "\n" ) . length ;
2617
2617
var elems = [ ] ;
@@ -2768,7 +2768,7 @@ function defocusSearchBar() {
2768
2768
}
2769
2769
return 0 ;
2770
2770
} ) ;
2771
- var savedCrate = getCurrentValue ( "rustdoc- saved-filter-crate") ;
2771
+ var savedCrate = getSettingValue ( " saved-filter-crate") ;
2772
2772
for ( var i = 0 ; i < crates_text . length ; ++ i ) {
2773
2773
var option = document . createElement ( "option" ) ;
2774
2774
option . value = crates_text [ i ] ;
0 commit comments