Rollup merge of #83809 - GuillaumeGomez:remove-initial-ids, r=camelid

Remove unneeded INITIAL_IDS const

Some IDs inside this map didn't exist anymore, some others were duplicates of what we have inside `IdMap`. So instead of keeping the two around and since `INITIAL_IDS` was only used by `IdMap`, no need to keep both of them.
This commit is contained in:
Dylan DPC
2021-04-04 19:20:04 +02:00
committed by GitHub
4 changed files with 11 additions and 30 deletions

View File

@@ -283,24 +283,6 @@ crate struct StylePath {
thread_local!(crate static CURRENT_DEPTH: Cell<usize> = Cell::new(0));
crate const INITIAL_IDS: [&'static str; 15] = [
"main",
"search",
"help",
"TOC",
"render-detail",
"associated-types",
"associated-const",
"required-methods",
"provided-methods",
"implementors",
"synthetic-implementors",
"implementors-list",
"synthetic-implementors-list",
"methods",
"implementations",
];
fn write_srclink(cx: &Context<'_>, item: &clean::Item, buf: &mut Buffer) {
if let Some(l) = cx.src_href(item) {
write!(buf, "<a class=\"srclink\" href=\"{}\" title=\"goto source code\">[src]</a>", l)