Skip to content

Commit cb85718

Browse files
committed
Slightly adjust prefix output.
1 parent 70964dd commit cb85718

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

include-lua-macro/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "include-lua-macro"
33
description = "Contains the implementation of the include_lua! procedural macro for the crate include-lua."
4-
version = "0.1.1"
4+
version = "0.1.2"
55
repository = "https://github.com/AlphaModder/include-lua"
66
license = "MIT"
77
authors = ["AlphaModder"]

include-lua-macro/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl IncludeLua {
4848
let add_files = modules.map(|(module, path)| {
4949
let module = LitStr::new(&module, Span::call_site());
5050
let real_path = LitStr::new(&PathBuf::from(self.0.value()).join(&path).to_string_lossy(), Span::call_site());
51-
let virtual_path = LitStr::new(&PathBuf::from(self.1.value()).join(&path).to_string_lossy(), Span::call_site());
51+
let virtual_path = LitStr::new(&path.to_string_lossy(), Span::call_site());
5252
quote! {
5353
files.insert(#module.to_string(), (include_str!(#real_path).to_string(), #virtual_path.to_string()))
5454
}

include-lua/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ impl UserData for Searcher {
2626
Ok(match this.0.files.get(&value) {
2727
Some((source, path)) => {
2828
Value::Function(ctx.load(source)
29-
.set_name(&format!("{}/{} (virtual)", &this.0.prefix, path))?
29+
.set_name(&format!("{}\\{} (virtual)", &this.0.prefix, path))?
3030
.set_environment(ctx.registry_value::<Table>(&this.1)?)?
3131
.into_function()?
3232
)

0 commit comments

Comments
 (0)