about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2019-11-07 10:16:14 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2019-11-07 10:39:53 +0100
commitd4527b7e00de1e6ed5b22a3fdb99a4515f2ba482 (patch)
tree02a394222ec7eef602807421b4507f2ac61ef2aa
parent24e093c5c387f229d72329326f4474264475c0f4 (diff)
downloadrust-d4527b7e00de1e6ed5b22a3fdb99a4515f2ba482.tar.gz
rust-d4527b7e00de1e6ed5b22a3fdb99a4515f2ba482.zip
Only call onHashChange instead of both functions
-rw-r--r--src/librustdoc/html/static/main.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index c3667dcfe3d..2200d19d86c 100644
--- a/src/librustdoc/html/static/main.js
+++ b/src/librustdoc/html/static/main.js
@@ -265,7 +265,7 @@ function getSearchElement() {
         if (match) {
             return highlightSourceLines(match, ev);
         }
-        handleHashes();
+        handleHashes(ev);
     }
 
     function expandSection(id) {
@@ -2652,8 +2652,7 @@ function getSearchElement() {
         insertAfter(popup, getSearchElement());
     }
 
-    handleHashes();
-    highlightSourceLines();
+    onHashChange();
     window.onhashchange = onHashChange;
 
     buildHelperPopup();