From a1950b076fca138a29745fe8cd899d08aed6152b Mon Sep 17 00:00:00 2001 From: kageru Date: Tue, 9 Jun 2020 20:53:28 +0200 Subject: [PATCH] make AUR sorting less stupid --- src/commands/aur.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/commands/aur.rs b/src/commands/aur.rs index 35a6f84..52e1d71 100644 --- a/src/commands/aur.rs +++ b/src/commands/aur.rs @@ -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); }