diff --git a/src/main.rs b/src/main.rs index 51317a7..649e9ff 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,7 +30,7 @@ async fn complete_channel(mut channel: Channel, client: &Client) -> Result, Vec)> = channel .items() .iter() - .sorted_by(|a, b| get_domain(a).cmp(&get_domain(b))) + .sorted_by_cached_key(|a| get_domain(a)) .chunk_by(|&item| get_domain(item)) .into_iter() .map(|(k, v)| (k, v.cloned().collect()))