rooms: Use unstable member sorting for the room name calculation

master
Damir Jelić 2021-01-05 20:26:27 +01:00
parent cdc93ddd0f
commit b8c6c2e07c
1 changed files with 2 additions and 2 deletions

View File

@ -159,7 +159,7 @@ impl BaseRoomInfo {
.map(|mem| mem.name()) .map(|mem| mem.name())
.collect::<Vec<&str>>(); .collect::<Vec<&str>>();
// stabilize ordering // stabilize ordering
names.sort(); names.sort_unstable();
names.join(", ") names.join(", ")
} else if heroes_count < invited_joined && invited_joined > 1 { } else if heroes_count < invited_joined && invited_joined > 1 {
let mut names = heroes let mut names = heroes
@ -167,7 +167,7 @@ impl BaseRoomInfo {
.take(3) .take(3)
.map(|mem| mem.name()) .map(|mem| mem.name())
.collect::<Vec<&str>>(); .collect::<Vec<&str>>();
names.sort(); names.sort_unstable();
// TODO: What length does the spec want us to use here and in // TODO: What length does the spec want us to use here and in
// the `else`? // the `else`?