~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.
3223b6b5
—
Mcat12 4 years ago
Undo the renaming of a function param
- impl/src/lib.rs +2 -2
impl/src/lib.rs
CHANGED
|
@@ -138,9 +138,9 @@ fn generate_assets(ident: &syn::Ident, folder_path: String, prefix: Option<Strin
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
#[cfg(not(feature = "compression"))]
|
|
141
|
-
fn embed_file(
|
|
141
|
+
fn embed_file(rel_path: &str, full_canonical_path: &str) -> TokenStream2 {
|
|
142
142
|
quote! {
|
|
143
|
-
#
|
|
143
|
+
#rel_path => {
|
|
144
144
|
let bytes = &include_bytes!(#full_canonical_path)[..];
|
|
145
145
|
Some(std::borrow::Cow::from(bytes))
|
|
146
146
|
},
|