Skip to content

Commit 59a9236

Browse files
committed
Fix bug where three tabs are show, only one matters
1 parent 3c93f68 commit 59a9236

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/librustdoc/html/static/js/search.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4935,7 +4935,11 @@ async function showResults(docSearch, results, goToFirst, filterCrates) {
49354935
searchState.currentTab = 0;
49364936
if (results.query.error !== null) {
49374937
tabs.push(makeTab(0, "In Names", results.others, results.query, false, goToFirst));
4938-
} else if (results.query.foundElems <= 1 && results.query.returned.length === 0) {
4938+
} else if (
4939+
results.query.foundElems <= 1 &&
4940+
results.query.returned.length === 0 &&
4941+
!results.query.hasReturnArrow
4942+
) {
49394943
tabs.push(makeTab(0, "In Names", results.others, results.query, false, goToFirst));
49404944
tabs.push(makeTab(1, "In Parameters", results.in_args, results.query, true, false));
49414945
tabs.push(makeTab(2, "In Return Types", results.returned, results.query, true, false));

0 commit comments

Comments
 (0)