mirror of
https://github.com/mlua-rs/mlua
synced 2026-06-08 16:05:43 +00:00
Fix getting caller information from Lua::load
This commit is contained in:
+2
-3
@@ -1371,9 +1371,8 @@ impl Lua {
|
||||
where
|
||||
S: AsChunk<'lua> + ?Sized,
|
||||
{
|
||||
let name = chunk
|
||||
.name()
|
||||
.unwrap_or_else(|| Location::caller().to_string());
|
||||
let caller = Location::caller();
|
||||
let name = chunk.name().unwrap_or_else(|| caller.to_string());
|
||||
|
||||
Chunk {
|
||||
lua: self,
|
||||
|
||||
Reference in New Issue
Block a user