replace pairs with ipairs where necessary
This commit is contained in:
@ -125,7 +125,7 @@ function M.synctree(tree, cb)
|
||||
end
|
||||
end
|
||||
|
||||
for _, package in pairs(tree) do
|
||||
for _, package in ipairs(tree) do
|
||||
local co = coroutine.create(function()
|
||||
-- if the package provided prefers a local source then use the local
|
||||
-- source instead of the git repository
|
||||
@ -170,7 +170,7 @@ return function(opts)
|
||||
M.registertree(opts)
|
||||
|
||||
-- sort package dependencies
|
||||
for _, package in pairs(packager.get_packages()) do
|
||||
for _, package in ipairs(packager.get_packages()) do
|
||||
table.sort(package.requirements, comp)
|
||||
table.sort(package.dependents, comp)
|
||||
end
|
||||
@ -198,7 +198,7 @@ return function(opts)
|
||||
|
||||
-- get all package that need syncing
|
||||
local targets = {}
|
||||
for _, package in pairs(packager.get_packages()) do
|
||||
for _, package in ipairs(packager.get_packages()) do
|
||||
if shouldsync(package) then
|
||||
table.insert(targets, package)
|
||||
end
|
||||
|
Reference in New Issue
Block a user