Fix lint errors on new luals version (#384)

This commit is contained in:
Cooldude2606
2025-04-06 17:05:40 +01:00
committed by GitHub
parent 3dbdb2071f
commit aedc3cff6b
7 changed files with 11 additions and 8 deletions

View File

@@ -37,6 +37,7 @@ local function nop() return nil, nil end
local function next_valid_element(elements, prev_index)
local element_index, element = next(elements, prev_index)
while element and not element.valid do
--- @cast element_index -nil
elements[element_index] = nil
element_index, element = next(elements, element_index)
end
@@ -61,6 +62,7 @@ local function next_valid_player(scope_elements, players, prev_index, online)
if index == nil then
return nil, nil, nil
end
--- @cast player -nil
if online == nil or player.connected == online then
local player_elements = scope_elements[player.index]