Skip to content

Commit b7287e9

Browse files
authored
Rollup merge of #93659 - UltiRequiem:refactor_conditional_static_rustdoc, r=GuillaumeGomez
Refactor conditional Merge two `if` in just one.
2 parents 9a5e937 + ca4296d commit b7287e9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -587,11 +587,8 @@ window.initSearch = function(rawSearchIndex) {
587587
}
588588

589589
function typePassesFilter(filter, type) {
590-
// No filter
591-
if (filter <= NO_TYPE_FILTER) return true;
592-
593-
// Exact match
594-
if (filter === type) return true;
590+
// No filter or Exact mach
591+
if (filter <= NO_TYPE_FILTER || filter === type) return true;
595592

596593
// Match related items
597594
var name = itemTypes[type];

0 commit comments

Comments
 (0)