From 5adff50b016b278cf16fcfca8845c86b67e333d1 Mon Sep 17 00:00:00 2001 From: Andrew Gunnerson Date: Sat, 27 Apr 2024 14:31:53 -0400 Subject: [PATCH] cli/ota: Fix incorrectly quoted output and clippy warning Signed-off-by: Andrew Gunnerson --- avbroot/src/cli/ota.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/avbroot/src/cli/ota.rs b/avbroot/src/cli/ota.rs index 393ba2f..682dfa0 100644 --- a/avbroot/src/cli/ota.rs +++ b/avbroot/src/cli/ota.rs @@ -388,7 +388,7 @@ fn get_vbmeta_patch_order( } if !missing.is_empty() { - warn!("Partitions aren't protected by AVB: {:?}", joined(missing)); + warn!("Partitions aren't protected by AVB: {}", joined(missing)); } // Ensure that there's only a single root of trust. Otherwise, there could @@ -493,9 +493,7 @@ fn update_security_descriptors( /// Get the text before the first equal sign in the kernel command line if it is /// not empty. fn cmdline_prefix(cmdline: &str) -> Option<&str> { - let Some((prefix, _)) = cmdline.split_once('=') else { - return None; - }; + let (prefix, _) = cmdline.split_once('=')?; if prefix.is_empty() { return None; } @@ -916,7 +914,7 @@ fn patch_ota_zip( } if !missing.is_empty() { - bail!("Missing entries in OTA zip: {:?}", joined(missing)); + bail!("Missing entries in OTA zip: {}", joined(missing)); } else if !paths.contains(ota::PATH_METADATA) && !paths.contains(ota::PATH_METADATA_PB) { bail!( "Neither legacy nor protobuf OTA metadata files exist: {:?}, {:?}",