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 committed Dec 11, 2017
1 parent 6537fd1 commit 557236c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/librustdoc/html/static/main.js
Expand Up @@ -911,24 +911,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 557236c

Please sign in to comment.