make AUR sorting less stupid
This commit is contained in:
parent
1edd6152dc
commit
a1950b076f
|
@ -17,11 +17,10 @@ pub fn query_aur(ctx: Context, msg: Message, args: Vec<&str>) {
|
|||
return;
|
||||
}
|
||||
response.results.sort_by(|a, b| {
|
||||
a.popularity
|
||||
.partial_cmp(&b.popularity)
|
||||
b.popularity
|
||||
.partial_cmp(&a.popularity)
|
||||
.unwrap_or(std::cmp::Ordering::Less)
|
||||
});
|
||||
response.results.reverse();
|
||||
respond_with_results(msg.channel_id, &response.results, &ctx);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user