From 38e1e5cffc9bb8f94022c4d7a3f913190d54dc78 Mon Sep 17 00:00:00 2001 From: Matej Hrica Date: Thu, 2 Nov 2023 11:41:10 +0100 Subject: [PATCH] Fix compilation for macOS target We need #[allow(unused_mut)], to disable warnings on other targets. Signed-off-by: Matej Hrica --- src/create.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/create.rs b/src/create.rs index 3b88f7e..17e9cd4 100644 --- a/src/create.rs +++ b/src/create.rs @@ -67,7 +67,8 @@ fn export_container_config( } pub fn create(cfg: &mut KrunvmConfig, matches: &ArgMatches) { - let cpus = match matches.value_of("cpus") { + #[allow(unused_mut)] + let mut cpus = match matches.value_of("cpus") { Some(c) => match c.parse::() { Err(_) => { println!("Invalid value for \"cpus\"");