Remove unused loop variables

This commit is contained in:
HybridDog
2021-03-07 19:19:00 +01:00
committed by Pierre-Adrien Langrognet
parent 182eb9822a
commit e5cdeef141
11 changed files with 17 additions and 17 deletions

View File

@ -339,14 +339,14 @@ local function do_test()
end
end
local i = 0
for pos, v in data:iter({x=-4, y=-4, z=-4}, {x=2, y=2, z=2}) do
for pos in data:iter({x=-4, y=-4, z=-4}, {x=2, y=2, z=2}) do
i = i + 1
assert(vector.equals(pos, expected_positions[i]))
end
print("Test if iter works correctly on a corner")
local found = false
for pos, v in data:iter({x=-8, y=-7, z=-80}, {x=-5, y=-5, z=-5}) do
for pos in data:iter({x=-8, y=-7, z=-80}, {x=-5, y=-5, z=-5}) do
assert(not found)
found = true
assert(vector.equals(pos, {x=-5, y=-5, z=-5}))