@@ -282,10 +282,10 @@ function getFilteredNextElem(query, parserState, elems, isInGenerics) {
282
282
}
283
283
284
284
/**
285
- * This function parses the next query element until it finds `endChar`,
285
+ * This function parses the next query element until it finds `endChar`,
286
286
* calling `getNextElem` to collect each element.
287
287
*
288
- * If there is no `endChar`, this function will implicitly stop at the end
288
+ * If there is no `endChar`, this function will implicitly stop at the end
289
289
* without raising an error.
290
290
*
291
291
* @param {ParsedQuery } query
@@ -398,7 +398,7 @@ function getItemsBefore(query, parserState, elems, endChar) {
398
398
if ( endChar !== "" && parserState . pos >= parserState . length ) {
399
399
throw [ "Unclosed " , extra ] ;
400
400
}
401
- // This case can be encountered if `getNextElem` encountered a "stop character"
401
+ // This case can be encountered if `getNextElem` encountered a "stop character"
402
402
// right from the start. For example if you have `,,` or `<>`. In this case,
403
403
// we simply move up the current position to continue the parsing.
404
404
if ( posBefore === parserState . pos ) {
@@ -750,7 +750,7 @@ function makePrimitiveElement(name, extra) {
750
750
}
751
751
752
752
/**
753
- * If we encounter a `"`, then we try to extract the string
753
+ * If we encounter a `"`, then we try to extract the string
754
754
* from it until we find another `"`.
755
755
*
756
756
* This function will throw an error in the following cases:
@@ -787,8 +787,8 @@ function getStringElem(query, parserState, isInGenerics) {
787
787
}
788
788
789
789
/**
790
- * This function goes through all characters until it reaches an invalid ident
791
- * character or the end of the query. It returns the position of the last
790
+ * This function goes through all characters until it reaches an invalid ident
791
+ * character or the end of the query. It returns the position of the last
792
792
* character of the ident.
793
793
*
794
794
* @param {ParserState } parserState
@@ -1221,7 +1221,7 @@ class DocSearch {
1221
1221
* functions that operate on a small set of data types, so the search index compresses them
1222
1222
* by encoding function parameter and return types as indexes into an array of names.
1223
1223
*
1224
- * Even when a general-purpose compression algorithm is used, this is still a win.
1224
+ * Even when a general-purpose compression algorithm is used, this is still a win.
1225
1225
* I checked. https://github.com/rust-lang/rust/pull/98475#issue-1284395985
1226
1226
*
1227
1227
* The format for individual function types is encoded in
@@ -1368,9 +1368,9 @@ class DocSearch {
1368
1368
/**
1369
1369
* Convert from RawFunctionSearchType to FunctionSearchType.
1370
1370
*
1371
- * Crates often have lots of functions in them, and function signatures are sometimes
1372
- * complex, so rustdoc uses a pretty tight encoding for them. This function converts it
1373
- * to a simpler, object-based encoding so that the actual search code is more readable
1371
+ * Crates often have lots of functions in them, and function signatures are sometimes
1372
+ * complex, so rustdoc uses a pretty tight encoding for them. This function converts it
1373
+ * to a simpler, object-based encoding so that the actual search code is more readable
1374
1374
* and easier to debug.
1375
1375
*
1376
1376
* The raw function search type format is generated using serde in
@@ -1389,7 +1389,9 @@ class DocSearch {
1389
1389
const OUTPUT_DATA = 1 ;
1390
1390
let inputs , output ;
1391
1391
if ( typeof functionSearchType [ INPUTS_DATA ] === "number" ) {
1392
- inputs = [ this . buildItemSearchType ( functionSearchType [ INPUTS_DATA ] , lowercasePaths ) ] ;
1392
+ inputs = [
1393
+ this . buildItemSearchType ( functionSearchType [ INPUTS_DATA ] , lowercasePaths )
1394
+ ] ;
1393
1395
} else {
1394
1396
inputs = this . buildItemSearchTypeAll (
1395
1397
functionSearchType [ INPUTS_DATA ] ,
@@ -1399,7 +1401,10 @@ class DocSearch {
1399
1401
if ( functionSearchType . length > 1 ) {
1400
1402
if ( typeof functionSearchType [ OUTPUT_DATA ] === "number" ) {
1401
1403
output = [
1402
- this . buildItemSearchType ( functionSearchType [ OUTPUT_DATA ] , lowercasePaths )
1404
+ this . buildItemSearchType (
1405
+ functionSearchType [ OUTPUT_DATA ] ,
1406
+ lowercasePaths ,
1407
+ )
1403
1408
] ;
1404
1409
} else {
1405
1410
output = this . buildItemSearchTypeAll (
@@ -2722,7 +2727,8 @@ class DocSearch {
2722
2727
if ( row . id > 0 && elem . id > 0 && elem . pathWithoutLast . length === 0 &&
2723
2728
typePassesFilter ( elem . typeFilter , row . ty ) && elem . generics . length === 0 &&
2724
2729
// special case
2725
- elem . id !== this . typeNameIdOfArrayOrSlice && elem . id !== this . typeNameIdOfTupleOrUnit
2730
+ elem . id !== this . typeNameIdOfArrayOrSlice
2731
+ && elem . id !== this . typeNameIdOfTupleOrUnit
2726
2732
&& elem . id !== this . typeNameIdOfHof
2727
2733
) {
2728
2734
return row . id === elem . id || checkIfInList (
@@ -2826,7 +2832,8 @@ class DocSearch {
2826
2832
const aliases = [ ] ;
2827
2833
const crateAliases = [ ] ;
2828
2834
if ( filterCrates !== null ) {
2829
- if ( this . ALIASES . has ( filterCrates ) && this . ALIASES . get ( filterCrates ) . has ( lowerQuery ) ) {
2835
+ if ( this . ALIASES . has ( filterCrates )
2836
+ && this . ALIASES . get ( filterCrates ) . has ( lowerQuery ) ) {
2830
2837
const query_aliases = this . ALIASES . get ( filterCrates ) . get ( lowerQuery ) ;
2831
2838
for ( const alias of query_aliases ) {
2832
2839
aliases . push ( createAliasFromItem ( this . searchIndex [ alias ] ) ) ;
0 commit comments