@@ -2521,7 +2521,11 @@ class DocSearch {
2521
2521
* @return {Promise<rustdoc.ResultsTable> }
2522
2522
*/
2523
2523
async execQuery ( origParsedQuery , filterCrates , currentCrate ) {
2524
- const results_others = new Map ( ) , results_in_args = new Map ( ) ,
2524
+ /** @type {rustdoc.Results } */
2525
+ const results_others = new Map ( ) ,
2526
+ /** @type {rustdoc.Results } */
2527
+ results_in_args = new Map ( ) ,
2528
+ /** @type {rustdoc.Results } */
2525
2529
results_returned = new Map ( ) ;
2526
2530
2527
2531
/** @type {rustdoc.ParsedQuery<rustdoc.QueryElement> } */
@@ -4452,7 +4456,6 @@ class DocSearch {
4452
4456
return ;
4453
4457
}
4454
4458
4455
- // @ts -expect-error
4456
4459
results . max_dist = Math . max ( results . max_dist || 0 , tfpDist ) ;
4457
4460
addIntoResults ( results , row . id . toString ( ) , pos , 0 , tfpDist , 0 , Number . MAX_VALUE ) ;
4458
4461
}
@@ -4561,29 +4564,23 @@ class DocSearch {
4561
4564
const returned = row . type && row . type . output
4562
4565
&& checkIfInList ( row . type . output , elem , row . type . where_clause , null , 0 ) ;
4563
4566
if ( in_args ) {
4564
- // @ts -expect-error
4565
4567
results_in_args . max_dist = Math . max (
4566
- // @ts -expect-error
4567
4568
results_in_args . max_dist || 0 ,
4568
4569
tfpDist ,
4569
4570
) ;
4570
4571
const maxDist = results_in_args . size < MAX_RESULTS ?
4571
4572
( tfpDist + 1 ) :
4572
- // @ts -expect-error
4573
4573
results_in_args . max_dist ;
4574
4574
// @ts -expect-error
4575
4575
addIntoResults ( results_in_args , row . id , i , - 1 , tfpDist , 0 , maxDist ) ;
4576
4576
}
4577
4577
if ( returned ) {
4578
- // @ts -expect-error
4579
4578
results_returned . max_dist = Math . max (
4580
- // @ts -expect-error
4581
4579
results_returned . max_dist || 0 ,
4582
4580
tfpDist ,
4583
4581
) ;
4584
4582
const maxDist = results_returned . size < MAX_RESULTS ?
4585
4583
( tfpDist + 1 ) :
4586
- // @ts -expect-error
4587
4584
results_returned . max_dist ;
4588
4585
// @ts -expect-error
4589
4586
addIntoResults ( results_returned , row . id , i , - 1 , tfpDist , 0 , maxDist ) ;
0 commit comments