kata-ctl: Make arch test run at compile time

Changed the `panic!()` call to a `compile_error!()` one to ensure it
fires at compile time rather than runtime.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
James O. D. Hunt 2022-08-17 18:06:29 +01:00
parent b63ba66dc3
commit 7c9f9a5a1d

View File

@ -3,7 +3,7 @@
// SPDX-License-Identifier: Apache-2.0
//
use anyhow::{Result};
use anyhow::Result;
#[cfg(target_arch = "aarch64")]
pub mod aarch64;
@ -36,7 +36,7 @@ pub fn check(global_args: clap::ArgMatches) -> Result<()> {
target_arch = "s390x",
target_arch = "x86_64"
)))]
panic!("unknown architecture");
compile_error!("unknown architecture");
result
}