Skip to content

Commit d7d92fa

Browse files
committed
docs: use better names for the local variable to show what is it holding
1 parent 11d3d83 commit d7d92fa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/SwiftUIFlowLayout/SwiftUIFlowLayout.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,22 +71,22 @@ public struct FlowLayout<RefreshBinding, Data: RandomAccessCollection, ItemView:
7171
height -= lastHeight
7272
}
7373
lastHeight = d.height
74-
let result = width
74+
let currentWidth = width
7575
let extraWidth = -itemSpacing * CGFloat(row)
7676
if index == itemCount - 1 {
7777
width = 0
7878
} else {
7979
width -= d.width
8080
}
81-
return result + extraWidth
81+
return currentWidth + extraWidth
8282
})
8383
.alignmentGuide(.top, computeValue: { d in
84-
let result = height
84+
let currentHeight = height
8585
let extraHeight = -itemSpacing * CGFloat(column)
8686
if index == itemCount - 1 {
8787
height = 0
8888
}
89-
return result + extraHeight
89+
return currentHeight + extraHeight
9090
})
9191
}
9292
}

0 commit comments

Comments
 (0)