Skip to content

Commit fa5468d

Browse files
committed
Avoid redundant loading
1 parent 59a9236 commit fa5468d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/librustdoc/html/static/js/search.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4426,6 +4426,9 @@ class DocSearch {
44264426
}
44274427
resultPromises.length = 0;
44284428
}
4429+
if (resultCounter >= MAX_RESULTS) {
4430+
return;
4431+
}
44294432
for await (const result of sortAndTransformResults(
44304433
await Promise.all(pushToBottom),
44314434
typeInfo,

0 commit comments

Comments
 (0)