Rename Panic to Panics

This commit is contained in:
lumi 2025-06-24 21:51:40 +10:00
parent 3dd375b071
commit 9d5bcc5ef2
Signed by: luaneko
GPG Key ID: 406809B8763FF07A

View File

@ -613,7 +613,7 @@ impl Stack {
///
/// Equivalent to [`lua_settop`].
///
/// # Panic
/// # Panics
///
/// Panics if `n` is negative.
pub fn resize(&mut self, n: c_int) {
@ -632,7 +632,7 @@ impl Stack {
///
/// Equivalent to [`lua_checkstack`].
///
/// # Panic
/// # Panics
///
/// Panics if `n` is negative or reallocation fails.
pub fn ensure(&self, n: c_int) {
@ -645,7 +645,7 @@ impl Stack {
///
/// Equivalent to [`lua_pop`].
///
/// # Panic
/// # Panics
///
/// Panics if there are less than `n` values on the stack.
pub fn pop(&mut self, n: c_int) {
@ -660,7 +660,7 @@ impl Stack {
///
/// Equivalent to [`lua_insert`].
///
/// # Panic
/// # Panics
///
/// Panics if the stack is empty or the index `idx` is invalid.
pub fn pop_insert(&mut self, idx: c_int) {
@ -677,7 +677,7 @@ impl Stack {
///
/// Equivalent to [`lua_replace`].
///
/// # Panic
/// # Panics
///
/// Panics if the stack is empty or the index `idx` is invalid.
pub fn pop_replace(&mut self, idx: c_int) {
@ -720,7 +720,7 @@ impl Stack {
/// Handle for the value at index `idx`.
///
/// # Panic
/// # Panics
///
/// Panics if the index `idx` is invalid.
pub fn slot<'s>(&'s self, idx: c_int) -> Slot<'s> {
@ -758,7 +758,7 @@ impl Stack {
///
/// Equivalent to [`lua_pushcclosure`].
///
/// # Panic
/// # Panics
///
/// Panics if the given function pointer is null.
pub fn push_function_raw(&mut self, f: lua_CFunction, upvals: c_int) {
@ -774,7 +774,7 @@ impl Stack {
///
/// Equivalent to [`lua_rawget`].
///
/// # Panic
/// # Panics
///
/// Panics if the value at index `idx` is not a table.
pub fn get(&mut self, idx: c_int) {
@ -794,7 +794,7 @@ impl Stack {
///
/// Equivalent to [`lua_rawgeti`].
///
/// # Panic
/// # Panics
///
/// Panics if the value at index `idx` is not a table.
pub fn geti(&mut self, idx: c_int, n: c_int) {
@ -816,7 +816,7 @@ impl Stack {
///
/// Equivalent to [`lua_rawset`].
///
/// # Panic
/// # Panics
///
/// Panics if the value at index `idx` is not a table.
pub fn set(&mut self, idx: c_int) {
@ -838,7 +838,7 @@ impl Stack {
///
/// Equivalent to [`lua_rawseti`].
///
/// # Panic
/// # Panics
///
/// Panics if the value at index `idx` is not a table.
pub fn seti(&mut self, idx: c_int, n: c_int) {
@ -863,7 +863,7 @@ impl Stack {
///
/// Equivalent to `table.pack(...)`.
///
/// # Panic
/// # Panics
///
/// Panics if `n` is negative, there are not enough values on the stack, or the value at index
/// `idx` is not a table.
@ -899,7 +899,7 @@ impl Stack {
///
/// Equivalent to `table.unpack(list, i, j)`.
///
/// # Panic
/// # Panics
///
/// Panics if the value at index `idx` is not a table.
pub fn unpack(&mut self, idx: c_int, i: c_int, j: Option<c_int>) -> c_int {
@ -990,7 +990,7 @@ impl Stack {
///
/// Equivalent to `string.dump(f, mode)`.
///
/// # Panic
/// # Panics
///
/// Panics if the value at index `idx` is not a function.
pub fn dump(&self, idx: c_int, mode: DumpMode) -> Result<BString> {
@ -1020,7 +1020,7 @@ impl Stack {
/// Equivalent to calling [`load`](Self::load) on the chunk and then [`call`](Self::call) on the
/// loaded function.
///
/// # Panic
/// # Panics
///
/// Panics if there are not enough values on the stack or thread status is invalid.
pub fn eval(&mut self, chunk: &Chunk, narg: c_int, nret: c_int) -> Result<c_int> {
@ -1046,7 +1046,7 @@ impl Stack {
///
/// Equivalent to [`lua_pcall`].
///
/// # Panic
/// # Panics
///
/// Panics if there are not enough values on the stack, the function to call is not on the
/// stack, or thread status is invalid.
@ -1108,7 +1108,7 @@ impl Stack {
/// Equivalent to multiple calls to [`lua_resume`] until the thread completes with a normal
/// result.
///
/// # Panic
/// # Panics
///
/// Panics if there are not enough values on the stack, the function to call is not on the
/// stack, or thread status is invalid.
@ -1172,7 +1172,7 @@ impl Stack {
///
/// Equivalent to [`lua_resume`].
///
/// # Panic
/// # Panics
///
/// Panics if there are not enough values on the stack, the function to call is not on the
/// stack, or thread status is invalid.