Rollup merge of #91667 - GuillaumeGomez:fix-index-itemtypes, r=notriddle

Fix indent of itemTypes in search.js

It has been bugging me for quite some time now. Finally took the time to clean it up a bit.

r? ```@notriddle```
This commit is contained in:
Matthias Krüger 2021-12-08 23:18:07 +01:00 committed by GitHub
commit 40c6606b78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,32 +4,34 @@
(function() {
// This mapping table should match the discriminants of
// `rustdoc::html::item_type::ItemType` type in Rust.
var itemTypes = ["mod",
"externcrate",
"import",
"struct",
"enum",
"fn",
"type",
"static",
"trait",
"impl",
"tymethod",
"method",
"structfield",
"variant",
"macro",
"primitive",
"associatedtype",
"constant",
"associatedconstant",
"union",
"foreigntype",
"keyword",
"existential",
"attr",
"derive",
"traitalias"];
var itemTypes = [
"mod",
"externcrate",
"import",
"struct",
"enum",
"fn",
"type",
"static",
"trait",
"impl",
"tymethod",
"method",
"structfield",
"variant",
"macro",
"primitive",
"associatedtype",
"constant",
"associatedconstant",
"union",
"foreigntype",
"keyword",
"existential",
"attr",
"derive",
"traitalias",
];
// used for special search precedence
var TY_PRIMITIVE = itemTypes.indexOf("primitive");