diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-06-30 14:11:09 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-06-30 14:11:09 +0200 |
| commit | 7b62d28cf2ca427dde2635e1ae5147a774442c99 (patch) | |
| tree | 5e530f7d603720950cd3d8834af3f070886e9ab2 | |
| parent | 451e98e7b02c8bf5e3bd5c9e780d51f7986a4408 (diff) | |
| download | rust-7b62d28cf2ca427dde2635e1ae5147a774442c99.tar.gz rust-7b62d28cf2ca427dde2635e1ae5147a774442c99.zip | |
Enforce search typed queries
| -rw-r--r-- | src/librustdoc/html/static/search.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustdoc/html/static/search.js b/src/librustdoc/html/static/search.js index 0aebb0e9d65..f6343e4c3d2 100644 --- a/src/librustdoc/html/static/search.js +++ b/src/librustdoc/html/static/search.js @@ -801,7 +801,8 @@ window.initSearch = function(rawSearchIndex) { results_returned[fullId].lev = Math.min(results_returned[fullId].lev, returned); } - if (index !== -1 || lev <= MAX_LEV_DISTANCE) { + if (typePassesFilter(typeFilter, ty.ty) && + (index !== -1 || lev <= MAX_LEV_DISTANCE)) { if (index !== -1 && paths.length < 2) { lev = 0; } |
