From 370fcce5646a55a15f2753bb3d8f249d065e192e Mon Sep 17 00:00:00 2001 From: binarycat Date: Thu, 25 Jul 2024 17:51:35 -0400 Subject: [PATCH] rustdoc: change title of search results the current title is too similar to that of the page for std::result::Result, which is a problem both for navigating to the Result docs via browser autocomplete, and for being able to tell which tab is which when the width of tabs is small. --- src/librustdoc/html/static/js/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustdoc/html/static/js/search.js b/src/librustdoc/html/static/js/search.js index 86af38f3ee75e..c6618c9859c79 100644 --- a/src/librustdoc/html/static/js/search.js +++ b/src/librustdoc/html/static/js/search.js @@ -2932,7 +2932,7 @@ ${item.displayPath}${name}\ } // Update document title to maintain a meaningful browser history - searchState.title = "Results for " + query.original + " - Rust"; + searchState.title = '"' + query.original + '" Search - Rust'; // Because searching is incremental by character, only the most // recent search query is added to the browser history.