Skip to content

Commit 7fc1c4e

Browse files
committed
Address clippy guidelines
1 parent 6239f57 commit 7fc1c4e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

openapi-lambda/src/lib.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,13 @@ pub type HttpResponse = Response<Body>;
3434
/// Serialize an [`HttpResponse`] as an [`ApiGatewayProxyResponse`].
3535
pub fn http_response_to_apigw(response: HttpResponse) -> ApiGatewayProxyResponse {
3636
let (parts, body) = response.into_parts();
37-
let is_base64_encoded = match body {
38-
Body::Binary(_) => true,
39-
_ => false,
40-
};
37+
let is_base64_encoded = matches!(body, Body::Binary(_));
4138
ApiGatewayProxyResponse {
4239
status_code: parts.status.as_u16() as i64,
4340
headers: Default::default(),
4441
multi_value_headers: parts.headers,
4542
body: Some(body),
46-
is_base64_encoded: is_base64_encoded,
43+
is_base64_encoded,
4744
}
4845
}
4946

0 commit comments

Comments
 (0)