Skip to content

Commit

Permalink
rustdoc: remove unused JS IIFE from main.js
Browse files Browse the repository at this point in the history
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"
  • Loading branch information
notriddle committed Nov 15, 2022
1 parent 6d651a2 commit 5649cbb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/librustdoc/html/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@ function blurHandler(event, parentElem, hideCallback) {
}
}

(function() {
window.rootPath = getVar("root-path");
window.currentCrate = getVar("current-crate");
}());
window.rootPath = getVar("root-path");
window.currentCrate = getVar("current-crate");

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

0 comments on commit 5649cbb

Please sign in to comment.