~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.


3e0ed685 Mark Drobnak

5 years ago
Merge pull request #102 from paolobarbolini/warp-fix
Files changed (1) hide show
  1. examples/warp.rs +1 -1
examples/warp.rs CHANGED
@@ -8,7 +8,7 @@ struct Asset;
8
8
  #[tokio::main]
9
9
  async fn main() {
10
10
  let index_html = warp::path::end().and_then(serve_index);
11
- let dist = warp::path!("dist").and(warp::path::tail()).and_then(serve);
11
+ let dist = warp::path("dist").and(warp::path::tail()).and_then(serve);
12
12
 
13
13
  let routes = index_html.or(dist);
14
14
  warp::serve(routes).run(([127, 0, 0, 1], 8080)).await;