packaging: resolve collapsible_match warnings for Rust 1.95

Rust 1.95's clippy introduces new `collapsible_match` lints for `if`
blocks nested inside match arms that can be expressed as match guards.

Generated-by: IBM Bob
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
This commit is contained in:
stevenhorsman
2026-06-30 05:46:02 -07:00
parent b8a0fbca46
commit 401cb58f03

View File

@@ -691,14 +691,12 @@ pub async fn setup_containerd_config_files(runtime: &str, config: &Config) -> Re
}
fs::File::create(drop_in_file_path)?;
}
"containerd" => {
if !Path::new(&config.containerd_conf_file).exists() {
if let Some(parent) = Path::new(&config.containerd_conf_file).parent() {
if parent.exists() {
// Write output to file
let output = utils::host_exec(&["containerd", "config", "default"])?;
fs::write(&config.containerd_conf_file, output)?;
}
"containerd" if !Path::new(&config.containerd_conf_file).exists() => {
if let Some(parent) = Path::new(&config.containerd_conf_file).parent() {
if parent.exists() {
// Write output to file
let output = utils::host_exec(&["containerd", "config", "default"])?;
fs::write(&config.containerd_conf_file, output)?;
}
}
}