Skip to content

Commit 6e2ded8

Browse files
committed
rustdoc js: give handleNameSearch a type signature
1 parent eda9cec commit 6e2ded8

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
@@ -4497,7 +4497,7 @@ class DocSearch {
44974497
if (parsedQuery.foundElems === 1 && !parsedQuery.hasReturnArrow) {
44984498
const elem = parsedQuery.elems[0];
44994499
// use arrow functions to preserve `this`.
4500-
// @ts-expect-error
4500+
/** @type {function(number): void} */
45014501
const handleNameSearch = id => {
45024502
const row = this.searchIndex[id];
45034503
if (!typePassesFilter(elem.typeFilter, row.ty) ||
@@ -4510,7 +4510,7 @@ class DocSearch {
45104510

45114511
const maybePathDist = checkPath(elem.pathWithoutLast, row);
45124512
if (maybePathDist === null) {
4513-
return
4513+
return;
45144514
}
45154515
pathDist = maybePathDist;
45164516
}

0 commit comments

Comments
 (0)