diff options
| author | Michael Howell <michael@notriddle.com> | 2022-11-15 13:03:44 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2022-11-15 13:03:44 -0700 |
| commit | 5649cbb9f87e4950106f417eadda6bdad7864124 (patch) | |
| tree | c43957f7f898fec25caeeb202ae9458f359a78e3 | |
| parent | 6d651a295e0e0c331153288b10b78344a4ede20b (diff) | |
| download | rust-5649cbb9f87e4950106f417eadda6bdad7864124.tar.gz rust-5649cbb9f87e4950106f417eadda6bdad7864124.zip | |
rustdoc: remove unused JS IIFE from main.js
This [IIFE] made sense when it was added in f0683f98fa114cc4f9e795031f44be3eebb65790 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"
| -rw-r--r-- | src/librustdoc/html/static/js/main.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js index 0538762e44d..874f130d7e2 100644 --- a/src/librustdoc/html/static/js/main.js +++ b/src/librustdoc/html/static/js/main.js @@ -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, |
