mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-07-12 01:44:30 +00:00
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:
@@ -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)?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user