@@ -1802,14 +1802,15 @@ class DocSearch {
18021802
18031803 /**
18041804 * @param {number } id
1805+ * @param {boolean } loadFunctionData
18051806 * @returns {Promise<rustdoc.Row?> }
18061807 */
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 ( [
18091810 this . getName ( id ) ,
18101811 this . getEntryData ( id ) ,
18111812 this . getPathData ( id ) ,
1812- this . getFunctionData ( id ) ,
1813+ loadFunctionData ? this . getFunctionData ( id ) : null ,
18131814 ] ) ;
18141815 if ( ! entry && ! path ) {
18151816 return null ;
@@ -1853,7 +1854,7 @@ class DocSearch {
18531854 `${ exactModulePathData . exactModulePath } ::${ exactModuleName } ` ) ,
18541855 entry,
18551856 path,
1856- type ,
1857+ functionData ,
18571858 deprecated : entry ? entry . deprecated : false ,
18581859 parent : parentName !== null && parentPath !== null ?
18591860 { name : parentName , path : parentPath } :
@@ -2563,11 +2564,11 @@ class DocSearch {
25632564 name : item . parent . name ,
25642565 ty : item . parent . path . ty ,
25652566 } : undefined ,
2566- type : item . type && item . type . functionSignature ?
2567- item . type . functionSignature :
2567+ type : item . functionData && item . functionData . functionSignature ?
2568+ item . functionData . functionSignature :
25682569 undefined ,
2569- paramNames : item . type && item . type . paramNames ?
2570- item . type . paramNames :
2570+ paramNames : item . functionData && item . functionData . paramNames ?
2571+ item . functionData . paramNames :
25712572 undefined ,
25722573 dist : result . dist ,
25732574 path_dist : result . path_dist ,
@@ -2642,7 +2643,7 @@ class DocSearch {
26422643 /**
26432644 * @type {rustdoc.Row? }
26442645 */
2645- const item = await this . getRow ( result . id ) ;
2646+ const item = await this . getRow ( result . id , typeInfo !== null ) ;
26462647 if ( ! item ) {
26472648 continue ;
26482649 }
@@ -3749,7 +3750,7 @@ class DocSearch {
37493750 is_alias : true ,
37503751 elems : [ ] , // only used in type-based queries
37513752 returned : [ ] , // only used in type-based queries
3752- original : await this . getRow ( alias ) ,
3753+ original : await this . getRow ( alias , false ) ,
37533754 } ;
37543755 } ;
37553756 /**
@@ -3804,7 +3805,7 @@ class DocSearch {
38043805 * @returns {Promise<rustdoc.PlainResultObject?> }
38053806 */
38063807 const handleNameSearch = async id => {
3807- const row = await this . getRow ( id ) ;
3808+ const row = await this . getRow ( id , false ) ;
38083809 if ( ! row || ! row . entry ) {
38093810 return null ;
38103811 }
0 commit comments