Skip to content

Commit

Permalink
tools: fix clippy warnings
Browse files Browse the repository at this point in the history
Fix Clippy warnings in the tools workspace.
  • Loading branch information
webern committed Sep 5, 2023
1 parent 71d8674 commit 82abd33
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions tools/buildsys/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion tools/pubsys/src/aws/ssm/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ impl From<&Vec<RenderedParameter>> 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(),
Expand Down
2 changes: 1 addition & 1 deletion tools/testsys/src/crds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<BTreeMap<String, String>>(),
)?,
hardware_csv: &crd_input
Expand Down

0 comments on commit 82abd33

Please sign in to comment.