mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Rollup merge of #93659 - UltiRequiem:refactor_conditional_static_rustdoc, r=GuillaumeGomez
Refactor conditional Merge two `if` in just one.
This commit is contained in:
commit
b7287e9e4f
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user