Skip to content

Commit

Permalink
Fix type filter in rustdoc js
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez authored and durka committed Dec 20, 2017
1 parent 78a7a81 commit 42ebc9c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -883,24 +883,24 @@
searchWords[j].replace(/_/g, "").indexOf(val) > -1)
{
// filter type: ... queries
if (typePassesFilter(typeFilter, ty) && results[fullId] === undefined) {
if (typePassesFilter(typeFilter, ty.ty) && results[fullId] === undefined) {
index = searchWords[j].replace(/_/g, "").indexOf(val);
}
}
if ((lev = levenshtein(searchWords[j], val)) <= MAX_LEV_DISTANCE) {
if (typePassesFilter(typeFilter, ty) === false) {
if (typePassesFilter(typeFilter, ty.ty) === false) {
lev = MAX_LEV_DISTANCE + 1;
} else {
lev += 1;
}
}
if ((in_args = findArg(ty, valGenerics)) <= MAX_LEV_DISTANCE) {
if (typePassesFilter(typeFilter, ty) === false) {
if (typePassesFilter(typeFilter, ty.ty) === false) {
in_args = MAX_LEV_DISTANCE + 1;
}
}
if ((returned = checkReturned(ty, valGenerics)) <= MAX_LEV_DISTANCE) {
if (typePassesFilter(typeFilter, ty) === false) {
if (typePassesFilter(typeFilter, ty.ty) === false) {
returned = MAX_LEV_DISTANCE + 1;
}
}
Expand Down

0 comments on commit 42ebc9c

Please sign in to comment.