about summary refs log tree commit diff
path: root/src/librustdoc/html
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-11-16 15:39:47 +0100
committerGitHub <noreply@github.com>2022-11-16 15:39:47 +0100
commitbaf1cbb70d21672f044c58ffc8e4c67454610f1f (patch)
tree94245a471971522d0ad92a9bb88b1311556de010 /src/librustdoc/html
parent163a7090b8c774785c8daea0e95e70e60ccfc6d0 (diff)
parent5649cbb9f87e4950106f417eadda6bdad7864124 (diff)
downloadrust-baf1cbb70d21672f044c58ffc8e4c67454610f1f.tar.gz
rust-baf1cbb70d21672f044c58ffc8e4c67454610f1f.zip
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 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"
Diffstat (limited to 'src/librustdoc/html')
-rw-r--r--src/librustdoc/html/static/js/main.js6
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,