~repos /rust-embed
GIT_CONFIG_PARAMETERS="'http.version=HTTP/1.1'" git clone
https://git.pyrossh.dev/rust-embed/.git
rust-embed
Discussions:
https://groups.google.com/g/rust-embed-devs
rust macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.
977cfc03
—
pyrossh 1 month ago
Fix folder_path not being an Option
- impl/src/lib.rs +2 -0
impl/src/lib.rs
CHANGED
|
@@ -390,6 +390,8 @@ fn impl_rust_embed(ast: &syn::DeriveInput) -> syn::Result<TokenStream2> {
|
|
|
390
390
|
Err(v) if v.cause == std::env::VarError::NotPresent && allow_missing => Ok(None),
|
|
391
391
|
Err(v) => Err(syn::Error::new_spanned(ast, v.to_string())),
|
|
392
392
|
}?;
|
|
393
|
+
#[cfg(not(feature = "interpolate-folder-path"))]
|
|
394
|
+
let folder_path = Some(folder_path);
|
|
393
395
|
|
|
394
396
|
// Base relative paths on the Cargo.toml location
|
|
395
397
|
let (relative_path, absolute_folder_path) = if let Some(folder_path) = folder_path {
|