about summary refs log tree commit diff
path: root/src/librustdoc/html/static/js/storage.js
diff options
context:
space:
mode:
authorRoy Wellington Ⅳ <cactus_hugged@yahoo.com>2023-01-21 17:33:03 -0500
committerRoy Wellington Ⅳ <cactus_hugged@yahoo.com>2023-01-21 17:33:49 -0500
commitee9e8cd0ec8c204d6c51acbc3663c40d089a3e24 (patch)
tree64b28f2ff163f36036e18d5a35354e64912c226c /src/librustdoc/html/static/js/storage.js
parent005fc0f00f2d4ceaf523b67a8f9c5665b8ac5baf (diff)
downloadrust-ee9e8cd0ec8c204d6c51acbc3663c40d089a3e24.tar.gz
rust-ee9e8cd0ec8c204d6c51acbc3663c40d089a3e24.zip
This function appears to be unused
The comment says that it is called from main.js, but there don't seem to
be any references to it in main.js.

A quick ripgrep says there are no references in all of librustdoc.
Diffstat (limited to 'src/librustdoc/html/static/js/storage.js')
-rw-r--r--src/librustdoc/html/static/js/storage.js16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/librustdoc/html/static/js/storage.js b/src/librustdoc/html/static/js/storage.js
index db2db83ca63..61856303483 100644
--- a/src/librustdoc/html/static/js/storage.js
+++ b/src/librustdoc/html/static/js/storage.js
@@ -153,22 +153,6 @@ function switchTheme(styleElem, mainStyleElem, newThemeName, saveTheme) {
     }
 }
 
-// This function is called from "main.js".
-// eslint-disable-next-line no-unused-vars
-function useSystemTheme(value) {
-    if (value === undefined) {
-        value = true;
-    }
-
-    updateLocalStorage("use-system-theme", value);
-
-    // update the toggle if we're on the settings page
-    const toggle = document.getElementById("use-system-theme");
-    if (toggle && toggle instanceof HTMLInputElement) {
-        toggle.checked = value;
-    }
-}
-
 const updateSystemTheme = (function() {
     if (!window.matchMedia) {
         // fallback to the CSS computed value