Rollup merge of #93659 - UltiRequiem:refactor_conditional_static_rustdoc, r=GuillaumeGomez

Refactor conditional

Merge two `if` in just one.
This commit is contained in:
Matthias Krüger 2022-02-06 04:13:35 +01:00 committed by GitHub
commit b7287e9e4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -587,11 +587,8 @@ window.initSearch = function(rawSearchIndex) {
}
function typePassesFilter(filter, type) {
// No filter
if (filter <= NO_TYPE_FILTER) return true;
// Exact match
if (filter === type) return true;
// No filter or Exact mach
if (filter <= NO_TYPE_FILTER || filter === type) return true;
// Match related items
var name = itemTypes[type];