File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -809,7 +809,10 @@ pub fn index(req: &mut Request) -> CargoResult<Response> {
809
809
if sort == "downloads" {
810
810
query = query. order ( ( perfect_match, crates:: downloads. desc ( ) ) ) ;
811
811
} else if sort == "recent-downloads" {
812
- query = query. order ( ( perfect_match, recent_downloads. clone ( ) . desc ( ) . nulls_last ( ) ) ) ;
812
+ query = query. order ( (
813
+ perfect_match,
814
+ recent_downloads. clone ( ) . desc ( ) . nulls_last ( ) ,
815
+ ) ) ;
813
816
} else {
814
817
let rank = ts_rank_cd ( crates:: textsearchable_index_col, q) ;
815
818
query = query. order ( ( perfect_match, rank. desc ( ) ) )
Original file line number Diff line number Diff line change @@ -378,9 +378,7 @@ fn exact_match_on_queries_with_sort() {
378
378
// Test for bug with showing null results first when sorting
379
379
// by descending
380
380
// This has nothing to do with querying for exact match I'm sorry
381
- let mut response = ok_resp ! ( middle. call(
382
- req. with_query( "sort=recent-downloads" ) ,
383
- ) ) ;
381
+ let mut response = ok_resp ! ( middle. call( req. with_query( "sort=recent-downloads" ) ) ) ;
384
382
let json: CrateList = :: json ( & mut response) ;
385
383
assert_eq ! ( json. meta. total, 4 ) ;
386
384
assert_eq ! ( json. crates[ 0 ] . name, "foo_sort" ) ;
You can’t perform that action at this time.
0 commit comments