Skip to content

Commit

Permalink
!fixup Improve a comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hywan committed Jul 1, 2024
1 parent 702343a commit a530955
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/matrix-sdk-ui/src/room_list_service/sorters/or.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ use super::{BoxedSorterFn, Sorter};
/// Create a new sorter that will run multiple sorters. When the nth sorter
/// returns [`Ordering::Equal`], the next sorter is called. It stops at soon as
/// a sorter return [`Ordering::Greater`] or [`Ordering::Less`].
///
/// This is an implementation of a lexicographic order as defined for cartesian
/// products ([learn more](https://en.wikipedia.org/wiki/Lexicographic_order#Cartesian_products)).
pub fn new_sorter(sorters: Vec<BoxedSorterFn>) -> impl Sorter {
move |left, right| -> Ordering {
for sorter in &sorters {
Expand Down

0 comments on commit a530955

Please sign in to comment.