mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-07 06:33:09 +00:00
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:
parent
b63ba66dc3
commit
7c9f9a5a1d
@ -3,7 +3,7 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
|
|
||||||
use anyhow::{Result};
|
use anyhow::Result;
|
||||||
|
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
pub mod aarch64;
|
pub mod aarch64;
|
||||||
@ -36,7 +36,7 @@ pub fn check(global_args: clap::ArgMatches) -> Result<()> {
|
|||||||
target_arch = "s390x",
|
target_arch = "s390x",
|
||||||
target_arch = "x86_64"
|
target_arch = "x86_64"
|
||||||
)))]
|
)))]
|
||||||
panic!("unknown architecture");
|
compile_error!("unknown architecture");
|
||||||
|
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user