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.


f4b0d81BBaoVanC 2023-01-18T14:37:27-06:00
No need to use ToString on Metadata::mimetype()
Files changed (1) hide show
  1. impl/src/lib.rs +1 -1
impl/src/lib.rs CHANGED
@@ -176,7 +176,7 @@ fn embed_file(rel_path: &str, full_canonical_path: &str) -> TokenStream2 {
176
176
  };
177
177
  #[cfg(feature = "mime-guess")]
178
178
  let mimetype = {
179
- let mt = file.metadata.mimetype().to_string();
179
+ let mt = file.metadata.mimetype();
180
180
  quote! { #mt }
181
181
  };
182
182
  #[cfg(not(feature = "mime-guess"))]