rustdoc: clean up redundant search hiding results code
* There's no need to call `history.replaceState` right before calling `searchState.hideResults`, which already does it. * There's no need to implement hiding search results when that is already implemented.
This commit is contained in:
parent
9d69ee0574
commit
0cd3874155
2 changed files with 1 additions and 8 deletions
|
@ -2412,10 +2412,6 @@ function initSearch(rawSearchIndex) {
|
|||
const searchAfter500ms = () => {
|
||||
searchState.clearInputTimeout();
|
||||
if (searchState.input.value.length === 0) {
|
||||
if (browserSupportsHistoryApi()) {
|
||||
history.replaceState(null, window.currentCrate + " - Rust",
|
||||
getNakedUrl() + window.location.hash);
|
||||
}
|
||||
searchState.hideResults();
|
||||
} else {
|
||||
searchState.timeout = setTimeout(search, 500);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue