Skip to content

Commit 4be003e

Browse files
committed
rename build_static_response for serving CSS files
1 parent 1c14e2b commit 4be003e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/web/statics.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ async fn handle_error(err: io::Error) -> impl IntoResponse {
2222
AxumNope::InternalError(err.into()).into_response()
2323
}
2424

25-
fn build_static_response(content: &'static str) -> impl IntoResponse {
25+
fn build_static_css_response(content: &'static str) -> impl IntoResponse {
2626
(
2727
Extension(CachePolicy::ForeverInCdnAndBrowser),
2828
[(CONTENT_TYPE, mime::TEXT_CSS.as_ref())],
@@ -57,19 +57,19 @@ pub(crate) fn build_static_router() -> AxumRouter {
5757
AxumRouter::new()
5858
.route(
5959
"/vendored.css",
60-
get_static(|| async { build_static_response(VENDORED_CSS) }),
60+
get_static(|| async { build_static_css_response(VENDORED_CSS) }),
6161
)
6262
.route(
6363
"/style.css",
64-
get_static(|| async { build_static_response(STYLE_CSS) }),
64+
get_static(|| async { build_static_css_response(STYLE_CSS) }),
6565
)
6666
.route(
6767
"/rustdoc.css",
68-
get_static(|| async { build_static_response(RUSTDOC_CSS) }),
68+
get_static(|| async { build_static_css_response(RUSTDOC_CSS) }),
6969
)
7070
.route(
7171
"/rustdoc-2021-12-05.css",
72-
get_static(|| async { build_static_response(RUSTDOC_2021_12_05_CSS) }),
72+
get_static(|| async { build_static_css_response(RUSTDOC_2021_12_05_CSS) }),
7373
)
7474
.nest_service(
7575
"/",

0 commit comments

Comments
 (0)