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 deaf5e200e79a75ac57d3f0952f6758a38168e52 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"
This commit is contained in:
Matthias Krüger 2022-11-20 23:50:28 +01:00 committed by GitHub
commit b2ee0df1b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -723,12 +723,9 @@ function loadCss(cssUrl) {
});
};
(function() {
// To avoid checking on "rustdoc-line-numbers" value on every loop...
if (getSettingValue("line-numbers") === "true") {
window.rustdoc_add_line_numbers_to_examples();
}
}());
if (getSettingValue("line-numbers") === "true") {
window.rustdoc_add_line_numbers_to_examples();
}
let oldSidebarScrollPosition = null;