diff options
| author | Nathan Perry <avaglir@gmail.com> | 2019-03-08 19:24:23 -0500 |
|---|---|---|
| committer | Nathan Perry <avaglir@gmail.com> | 2019-03-08 19:24:23 -0500 |
| commit | 5bf820305c230d5cf8e6014b0c396641d66e3906 (patch) | |
| tree | 3e9990baf4f4ba12477aabe1c8bf5d3db3a7c817 | |
| parent | 0f616d78ec3c3700b0cf93fd330dabb97d3b7425 (diff) | |
gaem: sort output by lowercase
| -rw-r--r-- | src/game.rs | 4 |
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) } |
