Skip to content

Commit b2ee0df

Browse files
authored
Rollup merge of #104581 - notriddle:notriddle/js-iife-2, r=GuillaumeGomez
rustdoc: remove unused JS IIFE from main.js This [IIFE] made sense when it was added in deaf5e2 and there was a local variable scoped to it, but now it calls a function, but declares nothing. [IIFE]: https://developer.mozilla.org/en-US/docs/Glossary/IIFE "immediately invoked function expression"
2 parents fce077b + 7db7cbd commit b2ee0df

File tree

1 file changed

+3
-6
lines changed
  • src/librustdoc/html/static/js

1 file changed

+3
-6
lines changed

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

+3-6
Original file line numberDiff line numberDiff line change
@@ -723,12 +723,9 @@ function loadCss(cssUrl) {
723723
});
724724
};
725725

726-
(function() {
727-
// To avoid checking on "rustdoc-line-numbers" value on every loop...
728-
if (getSettingValue("line-numbers") === "true") {
729-
window.rustdoc_add_line_numbers_to_examples();
730-
}
731-
}());
726+
if (getSettingValue("line-numbers") === "true") {
727+
window.rustdoc_add_line_numbers_to_examples();
728+
}
732729

733730
let oldSidebarScrollPosition = null;
734731

0 commit comments

Comments
 (0)