about summary refs log tree commit diff
path: root/src/librustdoc/html/render
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-11-21 01:22:59 +0000
committerbors <bors@rust-lang.org>2021-11-21 01:22:59 +0000
commit02913c078849f940371eb9930754f2b0f1bc9fad (patch)
tree0a6fd0ef11d252e29d5286c27765ad0da0018b26 /src/librustdoc/html/render
parent5bc98076f37dd8c1476de4bbe0515c55a65332b7 (diff)
parenta65421651adfcd5123153a847c075b5a14465f1d (diff)
downloadrust-02913c078849f940371eb9930754f2b0f1bc9fad.tar.gz
rust-02913c078849f940371eb9930754f2b0f1bc9fad.zip
Auto merge of #91073 - camelid:small-cleanups, r=jyn514
rustdoc: Make two small cleanups
Diffstat (limited to 'src/librustdoc/html/render')
-rw-r--r--src/librustdoc/html/render/cache.rs2
-rw-r--r--src/librustdoc/html/render/mod.rs2
2 files changed, 2 insertions, 2 deletions
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<DefId>,
     crate parent_idx: Option<usize>,
     crate search_type: Option<IndexItemFunctionType>,
-    crate aliases: Box<[String]>,
+    crate aliases: Box<[Symbol]>,
 }
 
 /// A type used for the search index.