diff --git a/src/efi.rs b/src/efi.rs index 2d76754..a3d93ad 100644 --- a/src/efi.rs +++ b/src/efi.rs @@ -259,7 +259,6 @@ impl Default for AuthVariable { impl Volume { pub fn boot_entries(&self) -> BootEntryIter { - // XXX - just store the iterator in the struct? let mut vars: Vec<&AuthVariable> = self .vars .iter() @@ -270,7 +269,7 @@ impl Volume { == EFI_GLOBAL_VARIABLE_GUID.to_string() }) .collect(); - vars.reverse(); + vars.sort_by(|a, b| b.name.partial_cmp(&a.name).unwrap()); BootEntryIter { vars } }