Skip to content

Commit 92db0f6

Browse files
committed
Fix Lua::inspect_stack callback proto
1 parent a3697ab commit 92db0f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/state.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ impl Lua {
875875
/// information about the function executing at a given level.
876876
/// Level `0` is the current running function, whereas level `n+1` is the function that has
877877
/// called level `n` (except for tail calls, which do not count in the stack).
878-
pub fn inspect_stack<R>(&self, level: usize, f: impl FnOnce(Debug) -> R) -> Option<R> {
878+
pub fn inspect_stack<R>(&self, level: usize, f: impl FnOnce(&Debug) -> R) -> Option<R> {
879879
let lua = self.lock();
880880
unsafe {
881881
let mut ar = mem::zeroed::<ffi::lua_Debug>();
@@ -889,7 +889,7 @@ impl Lua {
889889
return None;
890890
}
891891

892-
Some(f(Debug::new(&lua, level, &mut ar)))
892+
Some(f(&Debug::new(&lua, level, &mut ar)))
893893
}
894894
}
895895

0 commit comments

Comments
 (0)