Skip to content

Commit 76c4947

Browse files
committed
rustdoc js: give handleNameSearch a type signature
1 parent 46ff3ad commit 76c4947

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4496,7 +4496,7 @@ class DocSearch {
44964496
if (parsedQuery.foundElems === 1 && !parsedQuery.hasReturnArrow) {
44974497
const elem = parsedQuery.elems[0];
44984498
// use arrow functions to preserve `this`.
4499-
// @ts-expect-error
4499+
/** @type {function(number): void} */
45004500
const handleNameSearch = id => {
45014501
const row = this.searchIndex[id];
45024502
if (!typePassesFilter(elem.typeFilter, row.ty) ||
@@ -4509,7 +4509,7 @@ class DocSearch {
45094509

45104510
const maybePathDist = checkPath(elem.pathWithoutLast, row);
45114511
if (maybePathDist === null) {
4512-
return
4512+
return;
45134513
}
45144514
pathDist = maybePathDist;
45154515
}

0 commit comments

Comments
 (0)