From 82abd33b9e314dc0a20efb3cfabd5fae368c1642 Mon Sep 17 00:00:00 2001 From: Matthew James Briggs Date: Fri, 1 Sep 2023 16:56:01 -0700 Subject: [PATCH] tools: fix clippy warnings Fix Clippy warnings in the tools workspace. --- tools/buildsys/src/builder.rs | 4 +--- tools/pubsys/src/aws/ssm/template.rs | 2 +- tools/testsys/src/crds.rs | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/buildsys/src/builder.rs b/tools/buildsys/src/builder.rs index 8faf4bc1efd..0949d354571 100644 --- a/tools/buildsys/src/builder.rs +++ b/tools/buildsys/src/builder.rs @@ -207,9 +207,7 @@ impl VariantBuilder { ); args.build_arg( "KERNEL_PARAMETERS", - kernel_parameters - .map(|v| v.join(" ")) - .unwrap_or_else(|| "".to_string()), + kernel_parameters.map(|v| v.join(" ")).unwrap_or_default(), ); if let Some(image_features) = image_features { diff --git a/tools/pubsys/src/aws/ssm/template.rs b/tools/pubsys/src/aws/ssm/template.rs index bde1ccde6b4..ac60583e3cf 100644 --- a/tools/pubsys/src/aws/ssm/template.rs +++ b/tools/pubsys/src/aws/ssm/template.rs @@ -196,7 +196,7 @@ impl From<&Vec> for RenderedParametersMap { for parameter in parameters.iter() { parameter_map .entry(parameter.ssm_key.region.to_string()) - .or_insert(HashMap::new()) + .or_default() .insert( parameter.ssm_key.name.to_owned(), parameter.value.to_owned(), diff --git a/tools/testsys/src/crds.rs b/tools/testsys/src/crds.rs index 069a7eef4ff..43875d9368f 100644 --- a/tools/testsys/src/crds.rs +++ b/tools/testsys/src/crds.rs @@ -486,7 +486,7 @@ pub(crate) trait CrdCreator: Sync { .additional_fields(&test_type.to_string()) .into_iter() // Add the image id in case it is needed for cluster creation - .chain(Some(("image-id".to_string(), image_id.clone())).into_iter()) + .chain(Some(("image-id".to_string(), image_id.clone()))) .collect::>(), )?, hardware_csv: &crd_input