File tree 4 files changed +36
-1
lines changed
librustdoc/html/static/js
4 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -1323,7 +1323,6 @@ window.initSearch = rawSearchIndex => {
1323
1323
}
1324
1324
}
1325
1325
lev = levenshtein ( searchWord , elem . pathLast ) ;
1326
- lev += lev_add ;
1327
1326
if ( lev > 0 && elem . pathLast . length > 2 && searchWord . indexOf ( elem . pathLast ) > - 1 )
1328
1327
{
1329
1328
if ( elem . pathLast . length < 6 ) {
@@ -1332,6 +1331,7 @@ window.initSearch = rawSearchIndex => {
1332
1331
lev = 0 ;
1333
1332
}
1334
1333
}
1334
+ lev += lev_add ;
1335
1335
if ( lev > MAX_LEV_DISTANCE ) {
1336
1336
return ;
1337
1337
} else if ( index !== - 1 && elem . fullPath . length < 2 ) {
Original file line number Diff line number Diff line change
1
+ const QUERY = 'hashset::insert' ;
2
+
3
+ const EXPECTED = {
4
+ 'others' : [
5
+ // ensure hashset::insert comes first
6
+ { 'path' : 'std::collections::hash_set::HashSet' , 'name' : 'insert' } ,
7
+ { 'path' : 'std::collections::hash_set::HashSet' , 'name' : 'get_or_insert' } ,
8
+ { 'path' : 'std::collections::hash_set::HashSet' , 'name' : 'get_or_insert_with' } ,
9
+ { 'path' : 'std::collections::hash_set::HashSet' , 'name' : 'get_or_insert_owned' } ,
10
+ { 'path' : 'std::collections::hash_map::HashMap' , 'name' : 'insert' } ,
11
+ ] ,
12
+ } ;
Original file line number Diff line number Diff line change
1
+ // exact-check
2
+
3
+ const QUERY = 'b::ccccccc' ;
4
+
5
+ const EXPECTED = {
6
+ 'others' : [
7
+ // `ccccccc` is an exact match for all three of these.
8
+ // However `b` is a closer match for `bb` than for any
9
+ // of the others, so it ought to go first.
10
+ { 'path' : 'path_ordering::bb' , 'name' : 'Ccccccc' } ,
11
+ { 'path' : 'path_ordering::aa' , 'name' : 'Ccccccc' } ,
12
+ { 'path' : 'path_ordering::dd' , 'name' : 'Ccccccc' } ,
13
+ ] ,
14
+ } ;
Original file line number Diff line number Diff line change
1
+ pub mod dd {
2
+ pub struct Ccccccc ;
3
+ }
4
+ pub mod aa {
5
+ pub struct Ccccccc ;
6
+ }
7
+ pub mod bb {
8
+ pub struct Ccccccc ;
9
+ }
You can’t perform that action at this time.
0 commit comments