diff --git a/vmm/src/igvm/igvm_loader.rs b/vmm/src/igvm/igvm_loader.rs index 4d454f822..6e256c1ec 100644 --- a/vmm/src/igvm/igvm_loader.rs +++ b/vmm/src/igvm/igvm_loader.rs @@ -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()