From b8c6c2e07c7861afff1b9b1ead7ea4fe7094a586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Tue, 5 Jan 2021 20:26:27 +0100 Subject: [PATCH] rooms: Use unstable member sorting for the room name calculation --- matrix_sdk_base/src/rooms/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matrix_sdk_base/src/rooms/mod.rs b/matrix_sdk_base/src/rooms/mod.rs index 0c600257..29cb23c8 100644 --- a/matrix_sdk_base/src/rooms/mod.rs +++ b/matrix_sdk_base/src/rooms/mod.rs @@ -159,7 +159,7 @@ impl BaseRoomInfo { .map(|mem| mem.name()) .collect::>(); // stabilize ordering - names.sort(); + names.sort_unstable(); names.join(", ") } else if heroes_count < invited_joined && invited_joined > 1 { let mut names = heroes @@ -167,7 +167,7 @@ impl BaseRoomInfo { .take(3) .map(|mem| mem.name()) .collect::>(); - names.sort(); + names.sort_unstable(); // TODO: What length does the spec want us to use here and in // the `else`?