Skip to content

Commit f1818d7

Browse files
Edward AlmondEdward Almond
authored andcommitted
style(cloudformation): cargo fmt
1 parent 2354717 commit f1818d7

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

ruststack-cloudformation/src/handlers.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,10 @@ async fn handle_validate_template(state: Arc<CloudFormationState>, body: Bytes)
458458
<RequestId>00000000-0000-0000-0000-000000000000</RequestId>
459459
</ResponseMetadata>
460460
</ValidateTemplateResponse>"#,
461-
result.get("Description").and_then(|d| d.as_str()).unwrap_or("")
461+
result
462+
.get("Description")
463+
.and_then(|d| d.as_str())
464+
.unwrap_or("")
462465
);
463466
Response::builder()
464467
.status(StatusCode::OK)
@@ -502,7 +505,13 @@ async fn handle_get_template(state: Arc<CloudFormationState>, body: Bytes) -> Re
502505
</ResponseMetadata>
503506
</GetTemplateResponse>"#,
504507
// XML escape the template body
505-
stack.template.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;").replace("\"", "&quot;").replace("'", "&apos;")
508+
stack
509+
.template
510+
.replace("&", "&amp;")
511+
.replace("<", "&lt;")
512+
.replace(">", "&gt;")
513+
.replace("\"", "&quot;")
514+
.replace("'", "&apos;")
506515
);
507516
Response::builder()
508517
.status(StatusCode::OK)
@@ -573,7 +582,7 @@ async fn handle_describe_stack_resources(state: Arc<CloudFormationState>, body:
573582
</DescribeStackResourcesResponse>"#,
574583
members
575584
);
576-
585+
577586
Response::builder()
578587
.status(StatusCode::OK)
579588
.header(header::CONTENT_TYPE, "text/xml")

0 commit comments

Comments
 (0)