Skip to content
This repository was archived by the owner on Feb 20, 2024. It is now read-only.

Commit fb501cd

Browse files
committed
refactor: clippy fixes
1 parent a3536a2 commit fb501cd

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/lib/api_app/src/api/routes/testbed/productizers

src/lib/api_app/src/api/routes/testbed/productizers/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ fn build_data_product_uri(data_product: &str, data_source: &str) -> String {
7272
}
7373

7474
// Remove trailing slash from base url
75-
if testbed_base_url.ends_with("/") {
75+
if testbed_base_url.ends_with('/') {
7676
testbed_base_url.pop();
7777
}
7878

src/lib/api_app/src/api/routes/testbed/productizers/person/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub async fn get_data_product(data_product: &str, data_source: &str, request: Pa
2525
}
2626

2727
pub async fn write_data_product(data_product: &str, data_source: &str, request: ParsedRequest) -> Result<APIRoutingResponse, APIRoutingError> {
28-
let request_input: JSONValue = serde_json::from_str(request.body.as_str()).unwrap_or(json!({}));
28+
let request_input: JSONValue = serde_json::from_str(request.body.as_str()).unwrap_or_else(|_| json!({}));
2929
let request_headers = parse_testbed_request_headers(request)?;
3030
let response = post_json_request::<JSONValue, JSONValue>(
3131
build_data_product_uri(data_product, data_source),

0 commit comments

Comments
 (0)