rust-embed v8.11.0
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.
4a2a281
— Day Fisher
2024-04-10T18:49:15-07:00
add small comment
- impl/src/lib.rs +2 -0
impl/src/lib.rs
CHANGED
|
@@ -125,6 +125,8 @@ fn dynamic(ident: &syn::Ident, folder_path: String, prefix: Option<&str>, includ
|
|
|
125
125
|
const EXCLUDES: &[&str] = &[#(#excludes),*];
|
|
126
126
|
};
|
|
127
127
|
|
|
128
|
+
// In metadata_only mode, we still need to read file contents to generate the file hash, but
|
|
129
|
+
// then we drop the file data.
|
|
128
130
|
let strip_contents = metadata_only.then_some(quote! {
|
|
129
131
|
.map(|mut file| { file.data = ::std::default::Default::default(); file })
|
|
130
132
|
});
|