Skip to content

Commit a6051c7

Browse files
Remove unnecessary elem.name.length === 0 since the rustdoc search eBNF does not allow elements without a name
1 parent ab9cf32 commit a6051c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/html/static/js/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ window.initSearch = function(rawSearchIndex) {
925925
* no match, returns `MAX_LEV_DISTANCE + 1`.
926926
*/
927927
function checkType(row, elem, literalSearch) {
928-
if (elem.name.length === 0 || row[NAME].length === 0) {
928+
if (row[NAME].length === 0) {
929929
// This is a pure "generic" search, no need to run other checks.
930930
if (row.length > GENERICS_DATA) {
931931
return checkIfInGenerics(row, elem);

0 commit comments

Comments
 (0)