~repos /rust-embed
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.
f4b0d815
—
BBaoVanC 2 years ago
No need to use ToString on Metadata::mimetype()
- 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()
|
|
179
|
+
let mt = file.metadata.mimetype();
|
|
180
180
|
quote! { #mt }
|
|
181
181
|
};
|
|
182
182
|
#[cfg(not(feature = "mime-guess"))]
|