Skip to content

Commit 6686e78

Browse files
committed
Run cargo fmt
1 parent 6a86cbc commit 6686e78

File tree

6 files changed

+133
-111
lines changed

6 files changed

+133
-111
lines changed

Cargo.lock

+121-103
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

discounts/rust/network/default/src/generate_cart_fetch.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fn generate_cart_fetch(
3030
CartFetchHttpRequestHeader {
3131
name: "Content-Type".to_string(),
3232
value: "application/json".to_string(),
33-
}
33+
},
3434
],
3535
method: CartFetchHttpRequestMethod::POST,
3636
policy: CartFetchHttpRequestPolicy {
@@ -73,7 +73,7 @@ mod tests {
7373
CartFetchHttpRequestHeader {
7474
name: "Content-Type".to_string(),
7575
value: "application/json".to_string(),
76-
}
76+
},
7777
],
7878
method: CartFetchHttpRequestMethod::POST,
7979
policy: CartFetchHttpRequestPolicy {

discounts/rust/network/default/src/generate_cart_run.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ fn generate_cart_run(input: ResponseData) -> Result<FunctionCartRunResult> {
3131
let fetch_result = input.fetch_result.ok_or("Missing fetch result")?;
3232

3333
// Use jsonBody which is the only available property
34-
let json_body = fetch_result.json_body.ok_or("Missing json_body in response")?;
34+
let json_body = fetch_result
35+
.json_body
36+
.ok_or("Missing json_body in response")?;
3537

3638
// Parse using the JSON value
3739
let operation_items = serde_json::from_value::<Vec<OperationItem>>(json_body)

discounts/rust/network/default/src/generate_delivery_fetch.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fn generate_delivery_fetch(
3030
DeliveryFetchHttpRequestHeader {
3131
name: "Content-Type".to_string(),
3232
value: "application/json".to_string(),
33-
}
33+
},
3434
],
3535
method: DeliveryFetchHttpRequestMethod::POST,
3636
policy: DeliveryFetchHttpRequestPolicy {
@@ -73,7 +73,7 @@ mod tests {
7373
DeliveryFetchHttpRequestHeader {
7474
name: "Content-Type".to_string(),
7575
value: "application/json".to_string(),
76-
}
76+
},
7777
],
7878
method: DeliveryFetchHttpRequestMethod::POST,
7979
policy: DeliveryFetchHttpRequestPolicy {

discounts/rust/network/default/src/generate_delivery_run.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ fn generate_delivery_run(input: ResponseData) -> Result<FunctionDeliveryRunResul
2929
let fetch_result = input.fetch_result.ok_or("Missing fetch result")?;
3030

3131
// Use jsonBody which is the only available property
32-
let json_body = fetch_result.json_body.ok_or("Missing json_body in response")?;
32+
let json_body = fetch_result
33+
.json_body
34+
.ok_or("Missing json_body in response")?;
3335

3436
// Parse using the JSON value
3537
let operation_items = serde_json::from_value::<Vec<OperationItem>>(json_body)

discounts/rust/network/default/src/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use std::process;
2-
pub mod generate_cart_run;
3-
pub mod generate_delivery_run;
42
pub mod generate_cart_fetch;
3+
pub mod generate_cart_run;
54
pub mod generate_delivery_fetch;
5+
pub mod generate_delivery_run;
66

77
fn main() {
88
eprintln!("Please invoke a named export.");

0 commit comments

Comments
 (0)