fix: use sort_by_key to satisfy clippy unnecessary_sort_by
This commit is contained in:
@@ -211,7 +211,7 @@ fn discover_macos() -> SystemDnsInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Sort longest suffix first for most-specific matching
|
// Sort longest suffix first for most-specific matching
|
||||||
rules.sort_by(|a, b| b.suffix.len().cmp(&a.suffix.len()));
|
rules.sort_by_key(|r| std::cmp::Reverse(r.suffix.len()));
|
||||||
|
|
||||||
for rule in &rules {
|
for rule in &rules {
|
||||||
info!(
|
info!(
|
||||||
|
|||||||
Reference in New Issue
Block a user