11// From rust:
22/* global ALIASES, currentCrate, rootPath */
33
4+ // From DOM global ids:
5+ /* global help */
6+
47// Local js definitions:
58/* global addClass, getCurrentValue, hasClass */
6- /* global isHidden onEach , removeClass, updateLocalStorage */
9+ /* global isHidden, onEachLazy , removeClass, updateLocalStorage */
710
811if ( ! String . prototype . startsWith ) {
912 String . prototype . startsWith = function ( searchString , position ) {
@@ -79,8 +82,6 @@ if (!DOMTokenList.prototype.remove) {
7982 // 2 for "In Return Types"
8083 var currentTab = 0 ;
8184
82- var themesWidth = null ;
83-
8485 var titleBeforeSearch = document . title ;
8586
8687 function getPageId ( ) {
@@ -378,7 +379,7 @@ if (!DOMTokenList.prototype.remove) {
378379 len = rootPath . match ( / \. \. \/ / g) . length + 1 ;
379380
380381 for ( i = 0 ; i < len ; ++ i ) {
381- match = url . match ( / \/ [ ^ \ /] * $ / ) ;
382+ match = url . match ( / \/ [ ^ / ] * $ / ) ;
382383 if ( i < len - 1 ) {
383384 stripped = match [ 0 ] + stripped ;
384385 }
@@ -631,8 +632,6 @@ if (!DOMTokenList.prototype.remove) {
631632 if ( obj . length > GENERICS_DATA &&
632633 obj [ GENERICS_DATA ] . length >= val . generics . length ) {
633634 var elems = obj [ GENERICS_DATA ] . slice ( 0 ) ;
634- var total = 0 ;
635- var done = 0 ;
636635 // We need to find the type that matches the most to remove it in order
637636 // to move forward.
638637 var vlength = val . generics . length ;
@@ -649,8 +648,6 @@ if (!DOMTokenList.prototype.remove) {
649648 if ( lev . pos !== - 1 ) {
650649 elems . splice ( lev . pos , 1 ) ;
651650 lev_distance = Math . min ( lev . lev , lev_distance ) ;
652- total += lev . lev ;
653- done += 1 ;
654651 } else {
655652 return MAX_LEV_DISTANCE + 1 ;
656653 }
@@ -912,7 +909,6 @@ if (!DOMTokenList.prototype.remove) {
912909 fullId = generateId ( ty ) ;
913910
914911 // allow searching for void (no output) functions as well
915- var typeOutput = type . length > OUTPUT_DATA ? type [ OUTPUT_DATA ] . name : "" ;
916912 returned = checkReturned ( ty , output , true ) ;
917913 if ( output . name === "*" || returned === true ) {
918914 in_args = false ;
@@ -959,7 +955,7 @@ if (!DOMTokenList.prototype.remove) {
959955 query . output = val ;
960956 query . search = val ;
961957 // gather matching search results up to a certain maximum
962- val = val . replace ( / \ _/ g, "" ) ;
958+ val = val . replace ( / _ / g, "" ) ;
963959
964960 var valGenerics = extractGenerics ( val ) ;
965961
@@ -976,12 +972,10 @@ if (!DOMTokenList.prototype.remove) {
976972
977973 for ( j = 0 ; j < nSearchWords ; ++ j ) {
978974 var lev ;
979- var lev_distance ;
980975 ty = searchIndex [ j ] ;
981976 if ( ! ty || ( filterCrates !== undefined && ty . crate !== filterCrates ) ) {
982977 continue ;
983978 }
984- var lev_distance ;
985979 var lev_add = 0 ;
986980 if ( paths . length > 1 ) {
987981 lev = checkPath ( contains , paths [ paths . length - 1 ] , ty ) ;
0 commit comments