rust-embed v8.11.0

#rust#proc-macro#http

git clone https://git.pyrossh.dev/rust-embed

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


6afa748BBaoVanC 2023-01-18T14:38:14-06:00
Don't need to run mimetype through quote!
Files changed (1) hide show
  1. impl/src/lib.rs +1 -4
impl/src/lib.rs CHANGED
@@ -175,10 +175,7 @@ fn embed_file(rel_path: &str, full_canonical_path: &str) -> TokenStream2 {
175
175
  None => quote! { None },
176
176
  };
177
177
  #[cfg(feature = "mime-guess")]
178
- let mimetype = {
179
- let mt = file.metadata.mimetype();
178
+ let mimetype = file.metadata.mimetype();
180
- quote! { #mt }
181
- };
182
179
  #[cfg(not(feature = "mime-guess"))]
183
180
  let mimetype = quote! { None };
184
181