File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed
librustdoc/html/static/js Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -1323,7 +1323,6 @@ window.initSearch = rawSearchIndex => {
13231323 }
13241324 }
13251325 lev = levenshtein ( searchWord , elem . pathLast ) ;
1326- lev += lev_add ;
13271326 if ( lev > 0 && elem . pathLast . length > 2 && searchWord . indexOf ( elem . pathLast ) > - 1 )
13281327 {
13291328 if ( elem . pathLast . length < 6 ) {
@@ -1332,6 +1331,7 @@ window.initSearch = rawSearchIndex => {
13321331 lev = 0 ;
13331332 }
13341333 }
1334+ lev += lev_add ;
13351335 if ( lev > MAX_LEV_DISTANCE ) {
13361336 return ;
13371337 } else if ( index !== - 1 && elem . fullPath . length < 2 ) {
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