From d4527b7e00de1e6ed5b22a3fdb99a4515f2ba482 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 7 Nov 2019 10:16:14 +0100 Subject: [PATCH] Only call onHashChange instead of both functions --- src/librustdoc/html/static/main.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index c3667dcfe3df..2200d19d86c9 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();