Skip to content

Commit baf1cbb

Browse files
authored
Rollup merge of #104459 - notriddle:notriddle/main-js-iife, r=GuillaumeGomez
rustdoc: remove unused JS IIFE from main.js This [IIFE] made sense when it was added in f0683f9 and there was a local variable scoped to it, but now it only sets two globals, so it does nothing. [IIFE]: https://developer.mozilla.org/en-US/docs/Glossary/IIFE "immediately invoked function expression"
2 parents 163a709 + 5649cbb commit baf1cbb

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
@@ -47,10 +47,8 @@ function blurHandler(event, parentElem, hideCallback) {
4747
}
4848
}
4949

50-
(function() {
51-
window.rootPath = getVar("root-path");
52-
window.currentCrate = getVar("current-crate");
53-
}());
50+
window.rootPath = getVar("root-path");
51+
window.currentCrate = getVar("current-crate");
5452

5553
function setMobileTopbar() {
5654
// FIXME: It would be nicer to generate this text content directly in HTML,

0 commit comments

Comments
 (0)