~repos /rust-embed

#rust#proc-macro#http

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
Files changed (1) hide show
  1. 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(match_str: &str, full_canonical_path: &str) -> TokenStream2 {
141
+ fn embed_file(rel_path: &str, full_canonical_path: &str) -> TokenStream2 {
142
142
  quote! {
143
- #match_str => {
143
+ #rel_path => {
144
144
  let bytes = &include_bytes!(#full_canonical_path)[..];
145
145
  Some(std::borrow::Cow::from(bytes))
146
146
  },