From 398a7cd03a8e7acdf24001f62ececd848b4978ab Mon Sep 17 00:00:00 2001 From: Seyed Mojtaba Hosseini Zeidabadi Date: Thu, 5 Sep 2024 15:06:41 +0330 Subject: [PATCH] docs: use better names for the local variable to show what is it holding --- Sources/SwiftUIFlowLayout/SwiftUIFlowLayout.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/SwiftUIFlowLayout/SwiftUIFlowLayout.swift b/Sources/SwiftUIFlowLayout/SwiftUIFlowLayout.swift index 60e936b..b1c8ff3 100644 --- a/Sources/SwiftUIFlowLayout/SwiftUIFlowLayout.swift +++ b/Sources/SwiftUIFlowLayout/SwiftUIFlowLayout.swift @@ -71,22 +71,22 @@ public struct FlowLayout: View height -= lastHeight } lastHeight = d.height - let result = width + let currentWidth = width let extraWidth = -itemSpacing * CGFloat(row) if index == itemCount - 1 { width = 0 } else { width -= d.width } - return result + extraWidth + return currentWidth + extraWidth }) .alignmentGuide(.top, computeValue: { d in - let result = height + let currentHeight = height let extraHeight = -itemSpacing * CGFloat(column) if index == itemCount - 1 { height = 0 } - return result + extraHeight + return currentHeight + extraHeight }) } }