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