Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugin/fmt/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
local function defaultTableDebug(buffer, input)
buffer:writeRaw("{")

for key, value in pairs(input) do
for key, value in input do
buffer:write("[{:?}] = {:?}", key, value)

if next(input, key) ~= nil then
Expand All @@ -50,7 +50,7 @@ local function defaultTableDebugExtended(buffer, input)
buffer:writeLineRaw("{")
buffer:indent()

for key, value in pairs(input) do
for key, value in input do
buffer:writeLine("[{:?}] = {:#?},", key, value)
end

Expand Down
2 changes: 1 addition & 1 deletion plugin/src/App/bindingUtil.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ end
local function blendAlpha(alphaValues)
local alpha = 0

for _, value in pairs(alphaValues) do
for _, value in alphaValues do
alpha = alpha + (1 - alpha) * value
end

Expand Down
2 changes: 1 addition & 1 deletion plugin/src/Assets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ local Assets = {
local function guardForTypos(name, map)
strict(name, map)

for key, child in pairs(map) do
for key, child in map do
if type(child) == "table" then
guardForTypos(("%s.%s"):format(name, key), child)
end
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/ChangeBatcher/createPatchSet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ local encodePatchUpdate = require(script.Parent.encodePatchUpdate)
return function(instanceMap, propertyChanges)
local patch = PatchSet.newEmpty()

for instance, properties in pairs(propertyChanges) do
for instance, properties in propertyChanges do
local instanceId = instanceMap.fromInstances[instance]

if instanceId == nil then
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/ChangeBatcher/encodePatchUpdate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ return function(instance, instanceId, properties)
changedProperties = {},
}

for propertyName in pairs(properties) do
for propertyName in properties do
if propertyName == "Name" then
update.changedName = instance.Name
else
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/Dictionary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ local function merge(...)
local source = select(i, ...)

if source ~= nil then
for key, value in pairs(source) do
for key, value in source do
if value == None then
output[key] = nil
else
Expand Down
6 changes: 3 additions & 3 deletions plugin/src/InstanceMap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function InstanceMap:__fmtDebug(output)
-- Collect all of the entries in the InstanceMap and sort them by their
-- label, which helps make our output deterministic.
local entries = {}
for id, instance in pairs(self.fromIds) do
for id, instance in self.fromIds do
local label = string.format("%s (%s)", instance:GetFullName(), instance.ClassName)

table.insert(entries, { id, label })
Expand All @@ -73,7 +73,7 @@ function InstanceMap:__fmtDebug(output)
return a[2] < b[2]
end)

for _, entry in ipairs(entries) do
for _, entry in entries do
output:writeLine("{}: {}", entry[1], entry[2])
end

Expand Down Expand Up @@ -227,7 +227,7 @@ function InstanceMap:__disconnectSignals(instance)
-- around the extra table. ValueBase objects force us to use multiple
-- signals to emulate the Instance.Changed event, however.
if typeof(signals) == "table" then
for _, signal in ipairs(signals) do
for _, signal in signals do
signal:Disconnect()
end
else
Expand Down
4 changes: 2 additions & 2 deletions plugin/src/Reconciler/diff.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ local function trueEquals(a, b): boolean
-- For tables, try recursive deep equality
if typeA == "table" and typeB == "table" then
local checkedKeys = {}
for key, value in pairs(a) do
for key, value in a do
checkedKeys[key] = true
if not trueEquals(value, b[key]) then
return false
end
end
for key, value in pairs(b) do
for key, value in b do
if checkedKeys[key] then
continue
end
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/Reconciler/diff.spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ return function()
local function size(dict)
local len = 0

for _ in pairs(dict) do
for _ in dict do
len = len + 1
end

Expand Down
2 changes: 1 addition & 1 deletion plugin/src/Reconciler/hydrate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ local function hydrate(instanceMap, virtualInstances, rootId, rootInstance)
for _, childId in ipairs(virtualInstance.Children) do
local virtualChild = virtualInstances[childId]

for childIndex, childInstance in ipairs(existingChildren) do
for childIndex, childInstance in existingChildren do
if not isExistingChildVisited[childIndex] then
-- We guard accessing Name and ClassName in order to avoid
-- tripping over children of DataModel that Rojo won't have
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/Reconciler/reify.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function applyDeferredRefs(instanceMap, deferredRefs, unappliedPatch)
})
end

for _, entry in ipairs(deferredRefs) do
for _, entry in deferredRefs do
local _, refId = next(entry.virtualValue)

if refId == nil then
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/Reconciler/reify.spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ return function()
local function size(dict)
local len = 0

for _ in pairs(dict) do
for _ in dict do
len = len + 1
end

Expand Down
2 changes: 1 addition & 1 deletion plugin/src/preloadAssets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ local gatherAssetUrlsRecursive
function gatherAssetUrlsRecursive(currentTable, currentUrls)
currentUrls = currentUrls or {}

for _, value in pairs(currentTable) do
for _, value in currentTable do
if typeof(value) == "string" then
table.insert(currentUrls, value)
elseif typeof(value) == "table" then
Expand Down
Loading