From a65421651adfcd5123153a847c075b5a14465f1d Mon Sep 17 00:00:00 2001 From: Noah Lev Date: Fri, 19 Nov 2021 21:54:43 -0500 Subject: rustdoc: Record aliases as Symbols --- src/librustdoc/html/render/cache.rs | 2 +- src/librustdoc/html/render/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/librustdoc/html/render') diff --git a/src/librustdoc/html/render/cache.rs b/src/librustdoc/html/render/cache.rs index 0286d2a4c81..9aa69d94215 100644 --- a/src/librustdoc/html/render/cache.rs +++ b/src/librustdoc/html/render/cache.rs @@ -70,7 +70,7 @@ crate fn build_index<'tcx>(krate: &clean::Crate, cache: &mut Cache, tcx: TyCtxt< // Set up alias indexes. for (i, item) in search_index.iter().enumerate() { for alias in &item.aliases[..] { - aliases.entry(alias.to_lowercase()).or_insert_with(Vec::new).push(i); + aliases.entry(alias.as_str().to_lowercase()).or_default().push(i); } } diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index dd592de41bd..ffd09663f82 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -103,7 +103,7 @@ crate struct IndexItem { crate parent: Option, crate parent_idx: Option, crate search_type: Option, - crate aliases: Box<[String]>, + crate aliases: Box<[Symbol]>, } /// A type used for the search index. -- cgit 1.4.1-3-g733a5