~repos /rust-embed

#rust#proc-macro#http

git clone https://pyrossh.dev/repos/rust-embed.git
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.


Files changed (1) hide show
  1. impl/src/lib.rs +3 -2
impl/src/lib.rs CHANGED
@@ -148,8 +148,9 @@ fn impl_rust_embed(ast: &syn::DeriveInput) -> TokenStream2 {
148
148
  let folder_path = if Path::new(&folder_path).is_relative() {
149
149
  Path::new(&env::var("CARGO_MANIFEST_DIR").unwrap())
150
150
  .join(folder_path)
151
- .to_string_lossy()
152
- .to_string()
151
+ .to_str()
152
+ .unwrap()
153
+ .to_owned()
153
154
  } else {
154
155
  folder_path
155
156
  };