From d3e0ecc394e9d92e76a878a75d22eaf93f3451ff Mon Sep 17 00:00:00 2001 From: stevenhorsman Date: Wed, 29 Jan 2025 10:21:55 +0000 Subject: [PATCH] kata-ctl: Allow empty const Due to the way that multi-arch support is done, on various platforms we will get a clippy error: ``` error: this expression always evaluates to false ``` which might not be true on those other platforms, so allow this code pattern to suppress the clippy error Signed-off-by: stevenhorsman --- src/tools/kata-ctl/src/utils.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/kata-ctl/src/utils.rs b/src/tools/kata-ctl/src/utils.rs index 44865d65f9..644ed2b72f 100644 --- a/src/tools/kata-ctl/src/utils.rs +++ b/src/tools/kata-ctl/src/utils.rs @@ -111,6 +111,7 @@ pub fn get_distro_details(os_release: &str, os_release_clr: &str) -> Result<(Str target_arch = "aarch64", all(target_arch = "powerpc64", target_endian = "little"), ))] +#[allow(clippy::const_is_empty)] pub fn get_generic_cpu_details(cpu_info_file: &str) -> Result<(String, String)> { let cpu_info = kata_sys_util::cpu::get_single_cpu_info(cpu_info_file, "\n\n")?; let lines = cpu_info.lines();