mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-15 06:34:03 +00:00
agent: Fix CCv0 specific unnecessary_lazy_evaluations
As we bumped the rust toolchain to 1.66.0, some new warnings have been raised due to unnecessary_lazy_evaluations. Let's fix them all here. For more info about the warnings, please, take a look at: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
60a8a5bf4a
commit
c5be78a03d
@ -263,7 +263,8 @@ impl ImageService {
|
||||
if Path::new(SKOPEO_PATH).exists() {
|
||||
// Read the policy path from the agent config
|
||||
let config_policy_path = &AGENT_CONFIG.read().await.container_policy_path;
|
||||
let policy_path = (!config_policy_path.is_empty()).then(|| config_policy_path.as_str());
|
||||
let policy_path =
|
||||
(!config_policy_path.is_empty()).then_some(config_policy_path.as_str());
|
||||
Self::pull_image_from_registry(image, &cid, source_creds, policy_path, aa_kbc_params)?;
|
||||
Self::unpack_image(&cid)?;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user