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


9e5bda6c Mcat12

6 years ago
Fix mime_guess error in Warp example
Files changed (1) hide show
  1. examples/warp.rs +1 -1
examples/warp.rs CHANGED
@@ -22,7 +22,7 @@ fn main() {
22
22
  }
23
23
 
24
24
  fn serve(path: &str) -> Result<impl Reply, Rejection> {
25
- let mime = mime_guess::guess_mime_type(path);
25
+ let mime = mime_guess::from_path(path).first_or_octet_stream();
26
26
 
27
27
  let asset: Option<Cow<'static, [u8]>> = Asset::get(path);
28
28