Skip to content

Commit 7d91d18

Browse files
Copilotjosecelano
andcommitted
fix: apply code formatting and fix clippy warnings
- Fix doc markdown clippy warning in InventoryContext - Apply cargo fmt formatting to all modified files Co-authored-by: josecelano <[email protected]>
1 parent c2829c2 commit 7d91d18

File tree

3 files changed

+14
-16
lines changed

3 files changed

+14
-16
lines changed

src/application/steps/system/configure_firewall.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,7 @@ impl ConfigureFirewallStep {
8989
#[instrument(
9090
name = "configure_firewall",
9191
skip_all,
92-
fields(
93-
step_type = "system",
94-
component = "firewall",
95-
method = "ansible"
96-
)
92+
fields(step_type = "system", component = "firewall", method = "ansible")
9793
)]
9894
pub fn execute(&self) -> Result<(), CommandError> {
9995
warn!(

src/infrastructure/external_tools/ansible/template/renderer/mod.rs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -425,10 +425,12 @@ impl AnsibleTemplateRenderer {
425425
// Read template content
426426
let template_content = tokio::fs::read_to_string(&source_path)
427427
.await
428-
.map_err(|source| ConfigurationTemplateError::TeraTemplateReadFailed {
429-
file_name: template_name.to_string(),
430-
source,
431-
})?;
428+
.map_err(
429+
|source| ConfigurationTemplateError::TeraTemplateReadFailed {
430+
file_name: template_name.to_string(),
431+
source,
432+
},
433+
)?;
432434

433435
// Create File object for template processing
434436
let template_file =
@@ -443,16 +445,16 @@ impl AnsibleTemplateRenderer {
443445
let mut engine = crate::domain::template::TemplateEngine::new();
444446
let rendered_content = engine
445447
.render(template_file.filename(), template_file.content(), context)
446-
.map_err(|source| ConfigurationTemplateError::InventoryTemplateCreationFailed {
447-
source,
448-
})?;
448+
.map_err(
449+
|source| ConfigurationTemplateError::InventoryTemplateCreationFailed { source },
450+
)?;
449451

450452
// Write rendered content to output file
451453
let output_path = destination_dir.join(output_name);
452454
crate::domain::template::write_file_with_dir_creation(&output_path, &rendered_content)
453-
.map_err(|source| ConfigurationTemplateError::InventoryTemplateRenderFailed {
454-
source,
455-
})?;
455+
.map_err(
456+
|source| ConfigurationTemplateError::InventoryTemplateRenderFailed { source },
457+
)?;
456458

457459
tracing::debug!(
458460
"Successfully rendered Tera template {} to {}",

src/infrastructure/external_tools/ansible/template/wrappers/inventory/context/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub struct InventoryContext {
4242
ansible_host: AnsibleHost,
4343
ansible_ssh_private_key_file: SshPrivateKeyFile,
4444
ansible_port: AnsiblePort,
45-
/// Alias for ansible_port used in playbook templates
45+
/// Alias for `ansible_port` used in playbook templates
4646
#[serde(rename = "ssh_port")]
4747
ssh_port: AnsiblePort,
4848
}

0 commit comments

Comments
 (0)