Skip to content

Commit

Permalink
Add inline to FromLua<bool>::from_stack
Browse files Browse the repository at this point in the history
  • Loading branch information
khvzak committed Jan 27, 2024
1 parent e30b425 commit f5982bc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ impl<'lua> FromLua<'lua> for bool {
}
}

#[inline]
unsafe fn from_stack(idx: c_int, lua: &'lua Lua) -> Result<Self> {
Ok(ffi::lua_toboolean(lua.state(), idx) != 0)
}
Expand Down

0 comments on commit f5982bc

Please sign in to comment.