Rustdoc: change page title for search results

currently, the title is formatted as Results for {query}

with just 9 browser tabs open, this gets cut off into Results for.

i propose changing this to "{query}" Search Results or something similar. the quotation marks provide a difference between identifiers and search queries that is always visible, whereas currently i frequently get confused between search result tabs and tabs that point to std::result::Result. additionally, the reordering makes sure the most important info is shown first.

this small change would reduce friction when cross-referencing large quantities of documentation, decreasing mental overhead.

2 Likes

I would just do

query - search - crate_name documentation

i still think including the quotes is useful enough to be worth the one extra character of space.

for example, if you search for a type in the wrong crate, realize your mistake, switch tabs and do the search again, then click the type... you will now have two tabs with entirely different contents, but their titles share a large string prefix, possibly even longer than the default tab size.