Skip to content

Commit

Permalink
Rollup merge of #91667 - GuillaumeGomez:fix-index-itemtypes, r=notriddle
Browse files Browse the repository at this point in the history
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``
  • Loading branch information
matthiaskrgr authored Dec 8, 2021
2 parents e63611a + edd8814 commit 80bae28
Showing 1 changed file with 28 additions and 26 deletions.
54 changes: 28 additions & 26 deletions src/librustdoc/html/static/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 80bae28

Please sign in to comment.