@@ -1802,14 +1802,15 @@ class DocSearch {
1802
1802
1803
1803
/**
1804
1804
* @param {number } id
1805
+ * @param {boolean } loadFunctionData
1805
1806
* @returns {Promise<rustdoc.Row?> }
1806
1807
*/
1807
- async getRow ( id ) {
1808
- const [ name_ , entry , path , type ] = await Promise . all ( [
1808
+ async getRow ( id , loadFunctionData ) {
1809
+ const [ name_ , entry , path , functionData ] = await Promise . all ( [
1809
1810
this . getName ( id ) ,
1810
1811
this . getEntryData ( id ) ,
1811
1812
this . getPathData ( id ) ,
1812
- this . getFunctionData ( id ) ,
1813
+ loadFunctionData ? this . getFunctionData ( id ) : null ,
1813
1814
] ) ;
1814
1815
if ( ! entry && ! path ) {
1815
1816
return null ;
@@ -1853,7 +1854,7 @@ class DocSearch {
1853
1854
`${ exactModulePathData . exactModulePath } ::${ exactModuleName } ` ) ,
1854
1855
entry,
1855
1856
path,
1856
- type ,
1857
+ functionData ,
1857
1858
deprecated : entry ? entry . deprecated : false ,
1858
1859
parent : parentName !== null && parentPath !== null ?
1859
1860
{ name : parentName , path : parentPath } :
@@ -2563,11 +2564,11 @@ class DocSearch {
2563
2564
name : item . parent . name ,
2564
2565
ty : item . parent . path . ty ,
2565
2566
} : undefined ,
2566
- type : item . type && item . type . functionSignature ?
2567
- item . type . functionSignature :
2567
+ type : item . functionData && item . functionData . functionSignature ?
2568
+ item . functionData . functionSignature :
2568
2569
undefined ,
2569
- paramNames : item . type && item . type . paramNames ?
2570
- item . type . paramNames :
2570
+ paramNames : item . functionData && item . functionData . paramNames ?
2571
+ item . functionData . paramNames :
2571
2572
undefined ,
2572
2573
dist : result . dist ,
2573
2574
path_dist : result . path_dist ,
@@ -2642,7 +2643,7 @@ class DocSearch {
2642
2643
/**
2643
2644
* @type {rustdoc.Row? }
2644
2645
*/
2645
- const item = await this . getRow ( result . id ) ;
2646
+ const item = await this . getRow ( result . id , typeInfo !== null ) ;
2646
2647
if ( ! item ) {
2647
2648
continue ;
2648
2649
}
@@ -3749,7 +3750,7 @@ class DocSearch {
3749
3750
is_alias : true ,
3750
3751
elems : [ ] , // only used in type-based queries
3751
3752
returned : [ ] , // only used in type-based queries
3752
- original : await this . getRow ( alias ) ,
3753
+ original : await this . getRow ( alias , false ) ,
3753
3754
} ;
3754
3755
} ;
3755
3756
/**
@@ -3804,7 +3805,7 @@ class DocSearch {
3804
3805
* @returns {Promise<rustdoc.PlainResultObject?> }
3805
3806
*/
3806
3807
const handleNameSearch = async id => {
3807
- const row = await this . getRow ( id ) ;
3808
+ const row = await this . getRow ( id , false ) ;
3808
3809
if ( ! row || ! row . entry ) {
3809
3810
return null ;
3810
3811
}
0 commit comments