Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 7b62d28

Browse files
Enforce search typed queries
1 parent 451e98e commit 7b62d28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustdoc/html/static/search.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,8 @@ window.initSearch = function(rawSearchIndex) {
801801
results_returned[fullId].lev =
802802
Math.min(results_returned[fullId].lev, returned);
803803
}
804-
if (index !== -1 || lev <= MAX_LEV_DISTANCE) {
804+
if (typePassesFilter(typeFilter, ty.ty) &&
805+
(index !== -1 || lev <= MAX_LEV_DISTANCE)) {
805806
if (index !== -1 && paths.length < 2) {
806807
lev = 0;
807808
}

0 commit comments

Comments
 (0)