From e6953037e7f05ddd4546a7c338114e5bc8b18384 Mon Sep 17 00:00:00 2001 From: Julian Stecklina Date: Wed, 23 Nov 2022 12:13:45 +0100 Subject: [PATCH] Fix clippy warnings --- rust/lanzaboote/src/main.rs | 4 ++-- rust/lanzaboote/src/uefi_helpers.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/lanzaboote/src/main.rs b/rust/lanzaboote/src/main.rs index 9225535..81a745c 100644 --- a/rust/lanzaboote/src/main.rs +++ b/rust/lanzaboote/src/main.rs @@ -109,14 +109,14 @@ fn main(handle: Handle, mut system_table: SystemTable) -> Status { } 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 .boot_services() .start_image(kernel_handle) .status(); initrd_loader - .uninstall(&system_table.boot_services()) + .uninstall(system_table.boot_services()) .unwrap(); status } diff --git a/rust/lanzaboote/src/uefi_helpers.rs b/rust/lanzaboote/src/uefi_helpers.rs index 52ffb9f..a2585f7 100644 --- a/rust/lanzaboote/src/uefi_helpers.rs +++ b/rust/lanzaboote/src/uefi_helpers.rs @@ -66,5 +66,5 @@ pub fn booted_image_cmdline(boot_services: &BootServices) -> Result> { // If this fails, we have no load options and we return an empty string. .load_options_as_bytes() .map(|b| b.to_vec()) - .unwrap_or_else(|| Vec::new())) + .unwrap_or_default()) }