From 557236c5086061cbf7d7347217f50c1ef73d0f1f Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 12 Dec 2017 00:19:36 +0100 Subject: [PATCH] Fix type filter in rustdoc js --- src/librustdoc/html/static/main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 06e9cbbdf9a71..81971157b8492 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -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; } }