Skip to content

Commit 0c61f58

Browse files
committed
rustdoc: stop passing a title to replaceState second argument
As described on [MDN's replaceState page], this parameter is not currently used, and the empty string is "safe against future changes to the method." [MDN's replaceState page]: https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState
1 parent 84dd17b commit 0c61f58

File tree

1 file changed

+2
-4
lines changed
  • src/librustdoc/html/static/js

1 file changed

+2
-4
lines changed

src/librustdoc/html/static/js/main.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,7 @@ function preLoadCss(cssUrl) {
275275
document.title = searchState.titleBeforeSearch;
276276
// We also remove the query parameter from the URL.
277277
if (browserSupportsHistoryApi()) {
278-
history.replaceState(null, window.currentCrate + " - Rust",
279-
getNakedUrl() + window.location.hash);
278+
history.replaceState(null, "", getNakedUrl() + window.location.hash);
280279
}
281280
},
282281
getQueryStringParams: () => {
@@ -378,8 +377,7 @@ function preLoadCss(cssUrl) {
378377
searchState.clearInputTimeout();
379378
switchDisplayedElement(null);
380379
if (browserSupportsHistoryApi()) {
381-
history.replaceState(null, window.currentCrate + " - Rust",
382-
getNakedUrl() + window.location.hash);
380+
history.replaceState(null, "", getNakedUrl() + window.location.hash);
383381
}
384382
ev.preventDefault();
385383
searchState.defocus();

0 commit comments

Comments
 (0)