Skip to content

Commit ed57d82

Browse files
committed
Fix clippy
1 parent 6dd1a42 commit ed57d82

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

buildpacks/static-web-server/src/caddy_config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ use std::collections::HashMap;
1010
/// Transforms the given [`HerokuWebServerConfig`] into an equivalent Caddy JSON configuration.
1111
/// Keeping this as a single function, because many lines are just the JSON itself being assembled.
1212
#[allow(clippy::too_many_lines)]
13-
pub(crate) fn caddy_json_config(config: HerokuWebServerConfig) -> serde_json::Value {
13+
pub(crate) fn caddy_json_config(config: &HerokuWebServerConfig) -> serde_json::Value {
1414
let mut routes = vec![];
1515

1616
// Header routes come first so headers will be added to any response down the chain.
1717
if let Some(ref headers) = config.headers {
1818
tracing::info!({ CONFIG_RESPONSE_HEADERS_ENABLED } = true, "config");
19-
routes.extend(generate_response_headers_routes(&headers));
19+
routes.extend(generate_response_headers_routes(headers));
2020
}
2121

2222
let doc_root = config

buildpacks/static-web-server/src/config_web_server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub(crate) fn config_web_server(
5656
);
5757

5858
// Transform web server config to Caddy native JSON config
59-
let caddy_config_json = serde_json::to_string(&caddy_json_config(heroku_config))
59+
let caddy_config_json = serde_json::to_string(&caddy_json_config(&heroku_config))
6060
.map_err(StaticWebServerBuildpackError::Json)?;
6161

6262
let config_path = configuration_layer.path().join("caddy.json");

0 commit comments

Comments
 (0)