about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2022-04-16 16:13:57 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2022-04-18 20:59:09 +0200
commita6051c76dbe5e2d9935fa25c7232fe7b239272b8 (patch)
treeec4fcb47bd77e74356cd6dea047a9a81e7d7a7ae
parentab9cf32131960ee97a9f2f0fdf6dadbd02d3db92 (diff)
downloadrust-a6051c76dbe5e2d9935fa25c7232fe7b239272b8.tar.gz
rust-a6051c76dbe5e2d9935fa25c7232fe7b239272b8.zip
Remove unnecessary `elem.name.length === 0` since the rustdoc search eBNF does not allow elements without a name
-rw-r--r--src/librustdoc/html/static/js/search.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/static/js/search.js b/src/librustdoc/html/static/js/search.js
index a55c16a84ab..6edb6439edb 100644
--- a/src/librustdoc/html/static/js/search.js
+++ b/src/librustdoc/html/static/js/search.js
@@ -925,7 +925,7 @@ window.initSearch = function(rawSearchIndex) {
           *                     no match, returns `MAX_LEV_DISTANCE + 1`.
           */
         function checkType(row, elem, literalSearch) {
-            if (elem.name.length === 0 || row[NAME].length === 0) {
+            if (row[NAME].length === 0) {
                 // This is a pure "generic" search, no need to run other checks.
                 if (row.length > GENERICS_DATA) {
                     return checkIfInGenerics(row, elem);