]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #107331 - GuillaumeGomez:cleanup-js, r=notriddle
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Tue, 31 Jan 2023 22:38:49 +0000 (23:38 +0100)
committerGitHub <noreply@github.com>
Tue, 31 Jan 2023 22:38:49 +0000 (23:38 +0100)
Clean up eslint annotations and remove unused JS function

Thanks to https://github.com/rust-lang/rust/pull/107177 I realized that some eslint annotations might be unneeded so I cleaned them up. I also removed the unused function while we wait for https://github.com/rust-lang/rust/pull/107177 to be updated.

r? ``@notriddle``

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

index b9ad8ef70e917af855f4857ed46fbc40c5056194..c66f500f42333df8432907e758b771fee142cc5a 100644 (file)
@@ -180,7 +180,6 @@ function browserSupportsHistoryApi() {
     return window.history && typeof window.history.pushState === "function";
 }
 
-// eslint-disable-next-line no-unused-vars
 function loadCss(cssUrl) {
     const link = document.createElement("link");
     link.href = cssUrl;
index 8836d1b2e464bca1dd00c35ad9bd240ddbf72152..c72ac254fc08cff75f512a4842f6d30cf43eae02 100644 (file)
@@ -51,7 +51,6 @@ function hasClass(elem, className) {
     return elem && elem.classList && elem.classList.contains(className);
 }
 
-// eslint-disable-next-line no-unused-vars
 function addClass(elem, className) {
     if (!elem || !elem.classList) {
         return;