aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Perry <avaglir@gmail.com>2019-03-08 19:24:23 -0500
committerNathan Perry <avaglir@gmail.com>2019-03-08 19:24:23 -0500
commit5bf820305c230d5cf8e6014b0c396641d66e3906 (patch)
tree3e9990baf4f4ba12477aabe1c8bf5d3db3a7c817
parent0f616d78ec3c3700b0cf93fd330dabb97d3b7425 (diff)
gaem: sort output by lowercase
-rw-r--r--src/game.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game.rs b/src/game.rs
index 025d7a7..e75d476 100644
--- a/src/game.rs
+++ b/src/game.rs
@@ -261,7 +261,9 @@ fn game(_ctx: &mut Context, msg: &Message, args: Args, min_status: GameStatus) -
games_in_common = games_in_common.intersection(&relevant_games).cloned().collect();
}
- let games_formatted = games_in_common.iter().sorted().join("\n");
+ let games_formatted = games_in_common.iter().sorted_by(|a, b| {
+ a.to_lowercase().cmp(&b.to_lowercase())
+ }).join("\n");
send(msg.channel_id, &games_formatted, msg.tts)
}