mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Replace unneeded use of regex with a simple if
This commit is contained in:
parent
699ae365df
commit
f9251eef68
@ -564,7 +564,10 @@ window.initSearch = function(rawSearchIndex) {
|
||||
try {
|
||||
parseInput(query, parserState);
|
||||
if (parserState.typeFilter !== null) {
|
||||
var typeFilter = parserState.typeFilter.replace(/^const$/, "constant");
|
||||
var typeFilter = parserState.typeFilter;
|
||||
if (typeFilter === "const") {
|
||||
typeFilter = "constant";
|
||||
}
|
||||
query.typeFilter = itemTypeFromName(typeFilter);
|
||||
}
|
||||
} catch (err) {
|
||||
|
Loading…
Reference in New Issue
Block a user