Skip to content

Commit 5b7422a

Browse files
committed
fix: Use Lua 5.5 compatible for loop syntax
1 parent fc656b0 commit 5b7422a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/luarocks/build/rust-mlua.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ function mlua.run(rockspec, no_install)
7373

7474
fs.make_dir(dir.dir_name(libdir))
7575
for mod, rustlib_name in pairs(rockspec.build.modules) do
76+
-- Make loop variable mutable in Lua 5.5
77+
local mod
78+
7679
-- If `mod` is a number, then it's an array entry
7780
if type(mod) == "number" then
7881
mod = rustlib_name

0 commit comments

Comments
 (0)