From fc58e54e397f9c8bf142c8476d042d725e45bbc8 Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Fri, 15 May 2026 19:26:28 +0300 Subject: [PATCH] Make `arg_at` public It's quite useful to have. --- src/vm/state.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vm/state.rs b/src/vm/state.rs index c47c98f..1b8befc 100644 --- a/src/vm/state.rs +++ b/src/vm/state.rs @@ -651,7 +651,7 @@ impl LuaState { /// Returns the value at the given 1-based argument index, or `Val::Nil` /// if the slot is unset. #[inline] - fn arg_at(&self, n: usize) -> Val { + pub fn arg_at(&self, n: usize) -> Val { debug_assert!(n >= 1, "argument indices are 1-based"); let idx = self.base + n - 1; if idx < self.top {