Tidying
This commit is contained in:
parent
dd5103bb68
commit
f9f51839e5
@ -2162,7 +2162,8 @@ function initSearch(rawSearchIndex) {
|
|||||||
aliases.sort(sortFunc);
|
aliases.sort(sortFunc);
|
||||||
|
|
||||||
const fetchDesc = alias => {
|
const fetchDesc = alias => {
|
||||||
return searchIndexEmptyDesc.get(alias.crate).contains(alias.bitIndex) ? "" : searchState.loadDesc(alias);
|
return searchIndexEmptyDesc.get(alias.crate).contains(alias.bitIndex) ?
|
||||||
|
"" : searchState.loadDesc(alias);
|
||||||
};
|
};
|
||||||
const [crateDescs, descs] = await Promise.all([
|
const [crateDescs, descs] = await Promise.all([
|
||||||
Promise.all(crateAliases.map(fetchDesc)),
|
Promise.all(crateAliases.map(fetchDesc)),
|
||||||
@ -2546,7 +2547,8 @@ function initSearch(rawSearchIndex) {
|
|||||||
sorted_returned,
|
sorted_returned,
|
||||||
sorted_others,
|
sorted_others,
|
||||||
parsedQuery);
|
parsedQuery);
|
||||||
await handleAliases(ret, parsedQuery.original.replace(/"/g, ""), filterCrates, currentCrate);
|
await handleAliases(ret, parsedQuery.original.replace(/"/g, ""),
|
||||||
|
filterCrates, currentCrate);
|
||||||
await Promise.all([ret.others, ret.returned, ret.in_args].map(async list => {
|
await Promise.all([ret.others, ret.returned, ret.in_args].map(async list => {
|
||||||
const descs = await Promise.all(list.map(result => {
|
const descs = await Promise.all(list.map(result => {
|
||||||
return searchIndexEmptyDesc.get(result.crate).contains(result.bitIndex) ?
|
return searchIndexEmptyDesc.get(result.crate).contains(result.bitIndex) ?
|
||||||
|
@ -160,4 +160,4 @@ const EXPECTED = [
|
|||||||
in_args: [],
|
in_args: [],
|
||||||
returned: [],
|
returned: [],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user