vmm: igvm: Use sort_by_key instead of sort_by

Do the necessary replacement to satisfy clippy::unnecessary_sort_by.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
Anatol Belski
2026-03-06 00:39:57 +01:00
committed by Rob Bradford
parent e61349c10e
commit 4ebbbe2294

View File

@@ -433,7 +433,7 @@ pub fn load_igvm(
let mut now = Instant::now();
// Sort the gpas to group them by the page type
gpas.sort_by(|a, b| a.gpa.cmp(&b.gpa));
gpas.sort_by_key(|a| a.gpa);
let gpas_grouped = gpas
.iter()