mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
committed by
Rob Bradford
parent
e61349c10e
commit
4ebbbe2294
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user