Fix clippy warnings

This commit is contained in:
Julian Stecklina 2022-11-23 12:13:45 +01:00
parent 5a6c05cf11
commit e6953037e7
2 changed files with 3 additions and 3 deletions

View File

@ -109,14 +109,14 @@ fn main(handle: Handle, mut system_table: SystemTable<Boot>) -> Status {
} }
let mut initrd_loader = let mut initrd_loader =
InitrdLoader::new(&system_table.boot_services(), handle, initrd).unwrap(); InitrdLoader::new(system_table.boot_services(), handle, initrd).unwrap();
let status = system_table let status = system_table
.boot_services() .boot_services()
.start_image(kernel_handle) .start_image(kernel_handle)
.status(); .status();
initrd_loader initrd_loader
.uninstall(&system_table.boot_services()) .uninstall(system_table.boot_services())
.unwrap(); .unwrap();
status status
} }

View File

@ -66,5 +66,5 @@ pub fn booted_image_cmdline(boot_services: &BootServices) -> Result<Vec<u8>> {
// If this fails, we have no load options and we return an empty string. // If this fails, we have no load options and we return an empty string.
.load_options_as_bytes() .load_options_as_bytes()
.map(|b| b.to_vec()) .map(|b| b.to_vec())
.unwrap_or_else(|| Vec::new())) .unwrap_or_default())
} }