Skip to content

Commit d4527b7

Browse files
Only call onHashChange instead of both functions
1 parent 24e093c commit d4527b7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/librustdoc/html/static/main.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ function getSearchElement() {
265265
if (match) {
266266
return highlightSourceLines(match, ev);
267267
}
268-
handleHashes();
268+
handleHashes(ev);
269269
}
270270

271271
function expandSection(id) {
@@ -2652,8 +2652,7 @@ function getSearchElement() {
26522652
insertAfter(popup, getSearchElement());
26532653
}
26542654

2655-
handleHashes();
2656-
highlightSourceLines();
2655+
onHashChange();
26572656
window.onhashchange = onHashChange;
26582657

26592658
buildHelperPopup();

0 commit comments

Comments
 (0)