@@ -1211,7 +1211,7 @@ class DocSearch {
12111211 * will never fulfill.
12121212 */
12131213 async buildIndex ( ) {
1214- const nn = this . database . getIndex ( "normalizedName" ) ;
1214+ const nn = this . database . getData ( "normalizedName" ) ;
12151215 if ( ! nn ) {
12161216 return ;
12171217 }
@@ -3706,7 +3706,7 @@ class DocSearch {
37063706 * @returns {AsyncGenerator<rustdoc.ResultObject> }
37073707 */
37083708 async function * ( currentCrate ) {
3709- const index = this . database . getIndex ( "normalizedName" ) ;
3709+ const index = this . database . getData ( "normalizedName" ) ;
37103710 if ( ! index ) {
37113711 return ;
37123712 }
@@ -3835,8 +3835,7 @@ class DocSearch {
38353835 } ;
38363836 if ( elem . normalizedPathLast === "" ) {
38373837 // faster full-table scan for this specific case.
3838- const nameData = this . database . getData ( "name" ) ;
3839- const l = nameData ? nameData . length : 0 ;
3838+ const l = index . length ;
38403839 for ( let id = 0 ; id < l ; ++ id ) {
38413840 if ( ! idDuplicates . has ( id ) ) {
38423841 idDuplicates . add ( id ) ;
@@ -3938,7 +3937,7 @@ class DocSearch {
39383937 * @returns {AsyncGenerator<rustdoc.ResultObject> }
39393938 */
39403939 async function * ( inputs , output , typeInfo , currentCrate ) {
3941- const index = this . database . getIndex ( "normalizedName" ) ;
3940+ const index = this . database . getData ( "normalizedName" ) ;
39423941 if ( ! index ) {
39433942 return ;
39443943 }
0 commit comments