Skip to content

Commit 0ee8302

Browse files
authoredDec 12, 2017
Rollup merge of #46672 - GuillaumeGomez:fix-type-filter-search, r=QuietMisdreavus
Fix type filter in rustdoc js Fixes #46612. r? @QuietMisdreavus
2 parents db9e4ba + 557236c commit 0ee8302

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎src/librustdoc/html/static/main.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -911,24 +911,24 @@
911911
searchWords[j].replace(/_/g, "").indexOf(val) > -1)
912912
{
913913
// filter type: ... queries
914-
if (typePassesFilter(typeFilter, ty) && results[fullId] === undefined) {
914+
if (typePassesFilter(typeFilter, ty.ty) && results[fullId] === undefined) {
915915
index = searchWords[j].replace(/_/g, "").indexOf(val);
916916
}
917917
}
918918
if ((lev = levenshtein(searchWords[j], val)) <= MAX_LEV_DISTANCE) {
919-
if (typePassesFilter(typeFilter, ty) === false) {
919+
if (typePassesFilter(typeFilter, ty.ty) === false) {
920920
lev = MAX_LEV_DISTANCE + 1;
921921
} else {
922922
lev += 1;
923923
}
924924
}
925925
if ((in_args = findArg(ty, valGenerics)) <= MAX_LEV_DISTANCE) {
926-
if (typePassesFilter(typeFilter, ty) === false) {
926+
if (typePassesFilter(typeFilter, ty.ty) === false) {
927927
in_args = MAX_LEV_DISTANCE + 1;
928928
}
929929
}
930930
if ((returned = checkReturned(ty, valGenerics)) <= MAX_LEV_DISTANCE) {
931-
if (typePassesFilter(typeFilter, ty) === false) {
931+
if (typePassesFilter(typeFilter, ty.ty) === false) {
932932
returned = MAX_LEV_DISTANCE + 1;
933933
}
934934
}

0 commit comments

Comments
 (0)
Please sign in to comment.