~repos /rust-embed
git clone https://pyrossh.dev/repos/rust-embed.git
rust macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.
3a2b677f
—
frederikhors 3 years ago
remove unnecessary `to_string()`
examples/axum-spa/src/main.rs
CHANGED
|
@@ -27,7 +27,7 @@ async fn main() {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
async fn static_handler(uri: Uri) -> impl IntoResponse {
|
|
30
|
-
let path = uri.path().trim_start_matches('/')
|
|
30
|
+
let path = uri.path().trim_start_matches('/');
|
|
31
31
|
|
|
32
32
|
if path.is_empty() || path == INDEX_HTML {
|
|
33
33
|
return index_html().await.into_response();
|