~repos /rust-embed

#rust#proc-macro#http

git clone https://pyrossh.dev/repos/rust-embed.git
Discussions: https://groups.google.com/g/rust-embed-devs

rust macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.


Files changed (2) hide show
  1. .github/workflows/test.yml +2 -0
  2. impl/src/lib.rs +1 -1
.github/workflows/test.yml CHANGED
@@ -33,6 +33,8 @@ jobs:
33
33
  cargo test --test lib
34
34
  cargo test --test lib --features "debug-embed"
35
35
  cargo test --test lib --features "compression" --release
36
+ cargo test --test mime_guess --features "mime-guess"
37
+ cargo test --test mime_guess --features "mime-guess" --release
36
38
  cargo test --test interpolated_path --features "interpolate-folder-path"
37
39
  cargo test --test interpolated_path --features "interpolate-folder-path" --release
38
40
  cargo build --example basic
impl/src/lib.rs CHANGED
@@ -177,7 +177,7 @@ fn embed_file(rel_path: &str, full_canonical_path: &str) -> TokenStream2 {
177
177
  #[cfg(feature = "mime-guess")]
178
178
  let mimetype = {
179
179
  let mt = file.metadata.mimetype().to_string();
180
- quote! { Some(#mt) }
180
+ quote! { #mt }
181
181
  };
182
182
  #[cfg(not(feature = "mime-guess"))]
183
183
  let mimetype = quote! { None };