From 14a4551d5602f2764b8f60722b1565f77e88a169 Mon Sep 17 00:00:00 2001 From: Archana Shinde Date: Wed, 31 Aug 2022 10:52:50 -0700 Subject: [PATCH 1/2] versions: Upgrade rust supported version to 1.59.0 CI is failing with the issue: "package `time v0.3.14` cannot be built because it requires rustc 1.59.0 or newer, while the currently active rustc version is 1.58.1" Fixes: #1000 Signed-off-by: Archana Shinde --- versions.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/versions.yaml b/versions.yaml index 3898d85bcc..0464c63dbd 100644 --- a/versions.yaml +++ b/versions.yaml @@ -280,12 +280,12 @@ languages: rust: description: "Rust language" notes: "'version' is the default minimum version used by this project." - version: "1.58.1" + version: "1.59.0" meta: description: | 'newest-version' is the latest version known to work when building Kata - newest-version: "1.58.1" + newest-version: "1.59.0" specs: description: "Details of important specifications" From 2e3ae3f23022a3fc22fc930ba7ada59008cd7018 Mon Sep 17 00:00:00 2001 From: Archana Shinde Date: Wed, 31 Aug 2022 13:11:20 -0700 Subject: [PATCH 2/2] agent-ctl: Get rid of compiler warning With newer version of rust, we get compiler error of "unneeded late initalization". Signed-off-by: Archana Shinde --- src/tools/agent-ctl/src/utils.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/tools/agent-ctl/src/utils.rs b/src/tools/agent-ctl/src/utils.rs index 064b54486a..9533071496 100644 --- a/src/tools/agent-ctl/src/utils.rs +++ b/src/tools/agent-ctl/src/utils.rs @@ -98,13 +98,11 @@ pub fn signame_to_signum(name: &str) -> Result { return Ok(n); } - let mut search_term: String; - - if name.starts_with("SIG") { - search_term = name.to_string(); + let mut search_term: String = if name.starts_with("SIG") { + name.to_string() } else { - search_term = format!("SIG{}", name); - } + format!("SIG{}", name) + }; search_term = search_term.to_uppercase();