From fa1ea1d9557d080afc415b7f1074179119e11eb5 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Mon, 1 Jul 2024 15:11:56 +0200 Subject: [PATCH] !fixup Rename sorter `or` to `lexicographic`. --- crates/matrix-sdk-ui/src/room_list_service/room_list.rs | 4 ++-- .../src/room_list_service/sorters/{or.rs => lexicographic.rs} | 0 crates/matrix-sdk-ui/src/room_list_service/sorters/mod.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename crates/matrix-sdk-ui/src/room_list_service/sorters/{or.rs => lexicographic.rs} (100%) diff --git a/crates/matrix-sdk-ui/src/room_list_service/room_list.rs b/crates/matrix-sdk-ui/src/room_list_service/room_list.rs index 4a7bb6aa53c..eb0845bfa4b 100644 --- a/crates/matrix-sdk-ui/src/room_list_service/room_list.rs +++ b/crates/matrix-sdk-ui/src/room_list_service/room_list.rs @@ -30,7 +30,7 @@ use tokio::{select, sync::broadcast}; use super::{ filters::BoxedFilterFn, - sorters::{new_sorter_name, new_sorter_or, new_sorter_recency}, + sorters::{new_sorter_lexicographic, new_sorter_name, new_sorter_recency}, Error, Room, State, }; @@ -165,7 +165,7 @@ impl RoomList { let (values, stream) = (raw_values, merged_streams) .filter(filter_fn) - .sort_by(new_sorter_or(vec![ + .sort_by(new_sorter_lexicographic(vec![ Box::new(new_sorter_recency()), Box::new(new_sorter_name()) ])) diff --git a/crates/matrix-sdk-ui/src/room_list_service/sorters/or.rs b/crates/matrix-sdk-ui/src/room_list_service/sorters/lexicographic.rs similarity index 100% rename from crates/matrix-sdk-ui/src/room_list_service/sorters/or.rs rename to crates/matrix-sdk-ui/src/room_list_service/sorters/lexicographic.rs diff --git a/crates/matrix-sdk-ui/src/room_list_service/sorters/mod.rs b/crates/matrix-sdk-ui/src/room_list_service/sorters/mod.rs index 3426eb6ad64..553db16a399 100644 --- a/crates/matrix-sdk-ui/src/room_list_service/sorters/mod.rs +++ b/crates/matrix-sdk-ui/src/room_list_service/sorters/mod.rs @@ -14,14 +14,14 @@ //! A collection of room sorters. +mod lexicographic; mod name; -mod or; mod recency; use std::cmp::Ordering; +pub use lexicographic::new_sorter as new_sorter_lexicographic; pub use name::new_sorter as new_sorter_name; -pub use or::new_sorter as new_sorter_or; pub use recency::new_sorter as new_sorter_recency; use super::Room;