~repos /rust-embed

#rust#proc-macro#http

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()`
Files changed (1) hide show
  1. examples/axum-spa/src/main.rs +1 -1
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('/').to_string();
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();