From 8bbbfd5836c2ffa3b529b748544419e12fc89261 Mon Sep 17 00:00:00 2001 From: Ermal Kaleci Date: Fri, 5 Apr 2024 20:55:04 +0200 Subject: [PATCH] clippy --- src/extensions/client/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extensions/client/mod.rs b/src/extensions/client/mod.rs index 08c6523..e6819d2 100644 --- a/src/extensions/client/mod.rs +++ b/src/extensions/client/mod.rs @@ -203,7 +203,7 @@ impl Client { endpoints.retain(|e| e.url() != exclude.url()); } // Sort by health score - endpoints.sort_by(|a, b| b.health().score().cmp(&a.health().score())); + endpoints.sort_by_key(|endpoint| std::cmp::Reverse(endpoint.health().score())); // Pick the first one let selected_endpoint = endpoints[0].clone(); // Ensure it's connected