diff --git a/src/main.rs b/src/main.rs index 05c46e0..7796e07 100644 --- a/src/main.rs +++ b/src/main.rs @@ -27,7 +27,8 @@ async fn complete(mut channel: Channel, client: &Client) -> Result> let grouped: Vec> = channel .items() .iter() - .chunk_by(|item| get_domain(item)) + .sorted_by(|a, b| get_domain(a).cmp(&get_domain(b))) + .chunk_by(|&item| get_domain(item)) .into_iter() .map(|(_k, v)| v.cloned().collect()) .collect();